These learning resources primarily focus on programming using Good Design Principles and Design Patterns
- There is an emphasis on learning using PHP, although most patterns are universal to every object orientated language.
| # Display the version of Homebrew. | |
| $ brew --version | |
| # Print Help Information | |
| $ brew help | |
| # Print Help Info for a brew command | |
| $ brew help <sub-command> | |
| # Check system for potential problems. | |
| $ brew doctor | |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
| #!/usr/bin/env python | |
| # | |
| # Copyright (c) 2016, PagerDuty, Inc. <[email protected]> | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # * Redistributions of source code must retain the above copyright | |
| # notice, this list of conditions and the following disclaimer. | |
| # * Redistributions in binary form must reproduce the above copyright |
| #!/usr/bin/env python | |
| # | |
| # Copyright (c) 2016, PagerDuty, Inc. <[email protected]> | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # * Redistributions of source code must retain the above copyright | |
| # notice, this list of conditions and the following disclaimer. | |
| # * Redistributions in binary form must reproduce the above copyright |
$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>| SELECT * FROM pg_stat_activity WHERE datname = 'TransactionHistory' AND pid <> pg_backend_pid(); -- see currently active connections and their connections details | |
| SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'TransactionHistory' AND pid <> pg_backend_pid(); -- this will terminate all connections, but not your own connection | |
| alter database "TransactionHistory" WITH ALLOW_CONNECTIONS false; -- this will disallow further connections | |
| select pg_sleep(30); -- you can include this line to disallow connections for a given time, in seconds. i.e., if you need to block connections for 10 minutes you can use this: select pg_sleep(600) | |
| alter database "TransactionHistory" WITH ALLOW_CONNECTIONS true; -- this will allow new connections |