Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
$ curl http://python-distribute.org/distribute_setup.py | python | |
$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python |
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES; | |
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled; | |
// by the way, you need to logout and log back in for this to take effect. Or at least that's what | |
// Quartz Debug says. Who knows, maybe it's lying? | |
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging | |
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from. |
curl `pbpaste` | grep 'embed' | sed 's/^.*<a class="embed" href="//' | sed 's/".*$//' | pbcopy |
Starting RabbitMQ: | |
sudo rabbitmq-server -detached | |
Stopping RabbitMQ: | |
sudo rabbitmqctl stop | |
Adding User: | |
rabbitmqctl add_user hulk hulk | |
Adding Vhost: |
This is intended as a quick reference and showcase. For more complete info, see John Gruber's original spec and the Github-flavored Markdown info page.
This cheatsheet is specifically Markdown Here's version of Github-flavored Markdown. This differs slightly in styling and syntax from what Github uses, so what you see below might vary a little from what you get in a Markdown Here email, but it should be pretty close.
from xml.etree.ElementTree import Element, SubElement, tostring | |
def DictToXML(data,root='data'): | |
root = Element(root) | |
for (field, val) in data.iteritems(): | |
SubElement(root, field).text = val | |
return tostring(root) |
*.pyc | |
bin/ | |
include/ | |
lib/ |
#!/usr/bin/env bash | |
set -o errtrace | |
set -o errexit | |
facter_version=$1 | |
puppet_version=$2 | |
target_volume=$3 |
from blueprint import example | |
from extensions import mail | |
from flask import Flask | |
import settings | |
def create_app(settings=settings): | |
ret_val = Flask(__name__) | |
ret_val.config.from_object(settings) | |
# initialize extensions... |