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/python | |
"""Bootstrap Chef with no other dependencies.""" | |
import os | |
import sys | |
import platform | |
import subprocess | |
import json | |
import plistlib | |
import urllib2 |
#!/bin/zsh | |
# | |
# 404s | |
# | |
# Usage: | |
# 1. Download, rename to 404s, put in path (~/bin is a good place) | |
# 2. Run the script: | |
# | |
# $ 404s http://example.com | |
# |
#!/bin/bash | |
# Source this file in your .bash_profile e.g.: | |
# | |
# source ~/gitcheckouts/vpn_heplers/.vpn_helpers.sh | |
# | |
# Note: This script works best with NOPASSWD: ALL configured in your sudoers file: | |
# /etc/sudoers: | |
# %admin ALL=(ALL) NOPASSWD: ALL | |
# |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |