A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| global | |
| log 127.0.0.1 local1 | |
| maxconn 4096 | |
| #chroot /usr/share/haproxy | |
| uid 99 | |
| gid 99 | |
| #debug | |
| #quiet | |
| defaults |
| docker stop upstream1 | |
| docker stop upstream2 | |
| docker rm upstream1 | |
| docker rm upstream2 | |
| docker run -d -p 5673:5672 -p 8081:15672 -h upstream1 --name upstream1 -e RABBITMQ_ERLANG_COOKIE='SJBDYCLARUGZFQFCDQQZ' rabbitmq:3-management | |
| docker run -d -p 5674:5672 -p 8082:15672 -h upstream2 --name upstream2 -e RABBITMQ_ERLANG_COOKIE='SJBDYCLARUGZFQFCDQQZ' rabbitmq:3-management | |
| docker exec upstream2 rabbitmqctl stop_app | |
| docker exec upstream2 rabbitmqctl join_cluster rabbit@upstream1 |
| # list only containers exited | |
| docker ps -f "status=exited" | |
| # remove containers with exited status | |
| docker rm $(docker ps --filter "status=exited" -q) | |
| # open bash when run docker container | |
| docker run -ti python:2.7 bash | |
| # open bash when run docker container and make a volume |
| <?php | |
| class Myclass | |
| { | |
| private $baz; | |
| public function foo($qux) | |
| { | |
| $fee = 10 * $qux; // algorithm | |
| $this->getBaz()->bar($x); |
| grep "string" filename | grep "string" | wc -l |
| http://docs.phalconphp.com/en/latest/index.html | |
| https://developers.facebook.com/docs/php/gettingstarted/4.0.0 | |
| https://developers.facebook.com/docs/graph-api/reference/v2.0/user/events/ |
| Warning: Could not retrieve fact fqdn | |
| Error: Evaluation Error: Illegal name. The given name Apache::Service does not conform to the naming rule /^((::)?[a-z_]w*)(::[a-z]w*)*$/ at /etc/puppet/modules/apache/manifests/init.pp:86:23 on node ingresse | |
| Error: Evaluation Error: Illegal name. The given name Apache::Service does not conform to the naming rule /^((::)?[a-z_]w*)(::[a-z]w*)*$/ at /etc/puppet/modules/apache/manifests/init.pp:86:23 on node ingresse | |
| The following SSH command responded with a non-zero exit status. | |
| Vagrant assumes that this means the command failed! | |
| FACTER_ssh_username='vagrant' puppet apply --verbose --hiera_config /vagrant/hiera.yaml --parser future --manifestdir /tmp/vagrant-puppet-1/manifests --detailed-exitcodes /tmp/vagrant-puppet-1/manifests/default.pp || [ $? -eq 2 ] |
| Agudo (É): Option + E + a letra desejada | |
| C Cedilha (Ç): Option + C = Ç | |
| Til (Ã): Option + N + a letra desejada = Ã , Õ | |
| Circunflexo (Ê): Option + I + a letra desejada = Ê, Ô | |
| Trema (Ü): Option + U + a letra desejada Ü |