This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install python3 | |
==> Downloading http://www.python.org/ftp/python/3.1.3/Python-3.1.3.tar.bz2 | |
######################################################################## 100.0% | |
==> ./configure --prefix=/usr/local/Cellar/python3/3.1.3 --with-computed-gotos --enable-shared | |
==> make | |
/usr/bin/cc -c -O3 -w -pipe -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/usr/local/Cellar/readline/6.1/include -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c | |
/usr/bin/cc -c -O3 -w -pipe -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/usr/local/Cellar/readline/6.1/include -DPy_BUILD_CORE -o Parser/acceler.o Parser/acceler.c | |
/usr/bin/cc -c -O3 -w -pipe -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/usr/local/Cellar/readline/6.1/include -DPy_BUILD_CORE -o Parser/grammar1.o Parser/grammar1.c | |
/usr/bin/cc -c -O3 -w -pipe -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/usr/local/Cellar/readline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pyrocfile - Simple Python impementation of Procfile manager | |
# Written by Chris Testa (http://testa.co/) in 2011 | |
# Released in the Public Domain | |
import argparse, logging, os.path, random, re, select, signal, subprocess | |
def _new_logger(name, color=None): | |
logger = logging.getLogger(name) | |
hdlr = logging.StreamHandler() | |
color, end_color = '\033[9%dm' % (color or random.randint(1, 6)), '\033[0m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Written by @aknin | |
# https://gist.github.com/gists/2290744 | |
# This code has been placed in the public domain, no strings attached either way. | |
from __future__ import print_function | |
import platform | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cprint () { | |
printf "%b" "\e[1;37m${1}\e[0m\n" | |
} | |
usage() { | |
cat << EOF | |
usage: $0 [OPTIONS] <src> <dst> | |
--confirm <dst> dont ask for confirmation before destroying and restoring into <dst> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% heroku apps:create -s cedar restpaste | |
Creating restpaste... done, stack is cedar | |
http://restpaste.herokuapp.com/ | git@heroku.com:restpaste.git | |
Git remote heroku added | |
% heroku addons:remove shared-database:5mb | |
! WARNING: Potentially Destructive Action | |
! This command will affect the app: restpaste | |
! To proceed, type "restpaste" or re-run this command with --confirm restpaste |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boto==2.3.0 | |
gevent==0.13.7 | |
greenlet==0.3.4 | |
wsgiref==0.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dirtys () { | |
if ! which redis-server > /dev/null | |
then | |
echo no redis, no dirtys | |
return 1 | |
fi | |
redis-server - <<EOF | |
timeout 0 | |
logfile stdout | |
databases 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat > ok.coffee | |
1 | |
2 | |
$ cat > bad.coffee | |
1 | |
2 | |
$ coffee -cs < ok.coffee | |
// Generated by CoffeeScript 1.3.3 | |
(function() { | |
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# | |
# Mixpanel, Inc. -- http://mixpanel.com/ | |
# | |
# Python API client library to consume mixpanel.com analytics data. | |
import hashlib | |
import urllib | |
import time | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pip freeze | |
ipython==0.13 | |
readline==6.2.2 | |
wsgiref==0.1.2 | |
$ cat test.py | |
from IPython import embed ; embed() | |
import thread ; thread.start_new_thread(lambda: 5/0, ()) | |
$ python test.py | |
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) | |
Type "copyright", "credits" or "license" for more information. |
OlderNewer