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
| #!/usr/bin/env ruby | |
| require 'net/ssh' | |
| require 'timeout' | |
| require 'unicode' | |
| require 'colorize' | |
| hosts = ['127.0.0.1'] | |
| ports = ['22'] | |
| users = ['root', 'admin', 'ec2-user'] |
| # Manually secure port 6379 | |
| sudo iptables -A INPUT -p tcp --dport 6379 -s xxx.xxx.xxx.xxx -j ACCEPT | |
| sudo iptables -A INPUT -p tcp --dport 6379 -j DROP | |
| sudo iptables -L | |
| # Save current firewall config | |
| sudo iptables-save > /etc/iptables.conf | |
| # Load iptables.conf on startup | |
| sudo nano /etc/rc.local |
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |