Skip to content

Instantly share code, notes, and snippets.

View bitprophet's full-sized avatar
🎯
Focusing

Jeff Forcier bitprophet

🎯
Focusing
View GitHub Profile
#!/usr/bin/env python
# Copyright (c) 2008 Nick Jensen
# MIT License
import xml.dom.minidom
import urllib, sys, datetime
PHONE_STRIPS = ('-', ' ', ')', '(')
## Normal/flat -- this is still the default output of fab --list:
Available commands:
build_docs
deploy
db.migrate
system.install_package
system.debian.update_apt
@bitprophet
bitprophet / gist:1503116
Created December 20, 2011 20:25 — forked from blech75/gist:1503089
markdown and lists

i want to be able to do this:


# grocery list

* apples
* bananas
* strawberries
@bitprophet
bitprophet / bad.py
Created April 17, 2012 05:26 — forked from idan/gist:2403662
Parameter Usage Style
>>> def init(headers={}):
... print "headers before: %r" % headers
... headers['foo'] = 'bar'
... print "headers after: %r" % headers
...
...
>>> init()
headers before: {}
headers after: {'foo': 'bar'}
>>> init()
from fabric.api import parallel, execute, sudo
@parallel
def uptime():
sudo('uptime')
def do_my_stuff():
execute(uptime, hosts=['web1', 'web2'])
  1. The code will get better. Linus' Law: "given enough eyeballs, all bugs are shallow": we'll be able to get community contributions and bug reports, and thus the code will grow better faster than we can grow it ourselves. Also, Joy's Law - "No matter who you are, most of the smartest people work for someone else": we'll get better code from people who don't work for us than from people who do.

  2. We'll write better code. Wall's 3rd great virtual of a programmer, Hubris: we'll write better code when we don't want other people to say bad things about us. We'll do better with the world watching than with just us.

  3. Increased ability to hire. We're a 19k circ newspaper in a town most people have never heard of. Open source will help put us on the map, make us a place people actually might be interested in working.

  4. When we do hire, we'll be able to hire peop

@bitprophet
bitprophet / readme.md
Created September 15, 2013 04:12 — forked from coderanger/pycon.md

1: Application Deployment State of the Onion

An overview of the moving pieces in app deployment currently (ex. chef, puppet, salt, ansible, git, omnibus, compass, less, DB migrations, databases).

Description

Deploying a moderately complex web application has become quite a challenge over the years. As best-practices have evolved, it has become progressively more time-consuming to keep up with what tools exist and how to use them effectively. This talk will provide an overview of the ecosystem and provide pointers for more information about individual components or problems.

Audience