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
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7 | |
sudo rm -rf "/Applications/Python 2.7" | |
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | cut -d " " -f 18 | xargs -IM sudo rm /usr/local/bin/M | |
echo based on http://stackoverflow.com/questions/3819449/how-to-uninstall-python-2-7-on-a-mac-os-x-10-6-4 |
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
# In case you had some strange python installation | |
# NOTE: .pydistutils.cfg seems to be not compatible with brew install python | |
# areas I needed to clean before installation | |
# clean up ~/Library/Python | |
# clean up .local | |
# preconditions: | |
# xcode with command line tools installed | |
xcode-select --install |
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
#source: http://hints.macworld.com/article.php?story=201106020948369 | |
#disable | |
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist | |
#enable | |
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist | |
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
[buildout] | |
extensions = buildout.dumppickedversions | |
parts = | |
libevent | |
gevent | |
[gevent] | |
recipe = zc.recipe.egg:custom | |
include-dirs = ${libevent:location}/include | |
library-dirs = ${libevent:location}/lib |
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
[django-haystack] | |
location = django-haystack | |
recipe = zerokspot.recipe.git | |
repository = https://github.com/toastdriven/django-haystack.git | |
[xapian-haystack] | |
location = xapian-haystack | |
recipe = zerokspot.recipe.git | |
repository = https://github.com/notanumber/xapian-haystack.git |
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
from wsgiref.util import setup_testing_defaults, FileWrapper | |
from wsgiref.simple_server import make_server | |
import sys | |
from pprint import pprint | |
# A relatively simple WSGI application. It's going to print out the | |
# environment dictionary after being updated by setup_testing_defaults | |
def simple_app(environ, start_response): | |
setup_testing_defaults(environ) |
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
# extended version of | |
# | |
# http://mapbox.com/tilemill/docs/guides/osm-bright-mac-quickstart/ | |
# | |
# install PostgreSQL (fresh) | |
brew install postgresql | |
initdb /usr/local/var/postgres | |
mkdir -p ~/Library/LaunchAgents |
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
$puppetmaster_ip = '8.8.8.8' | |
augeas { "puppetmaster_in_hosts_append": | |
context => "/files/etc/hosts", | |
changes => [ | |
"set 01/ipaddr '${puppetmaster_ip}'", | |
"set 01/canonical puppet", | |
], | |
onlyif => "match *[ipaddr = '${puppetmaster_ip}'] size == 0" | |
} -> augeas { "puppetmaster_in_hosts_update": |
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
setup DISPLAY accordingly i.e. | |
export DISPLAY=:0 | |
import -window root file.png |
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
# from: http://matelakat.blogspot.co.uk/2012/03/lettuce-and-ipython-interactive-shell.html | |
# | |
@step(u'And give me IPython') | |
def and_continue_here(step): | |
import IPython | |
import sys | |
shell = IPython.InteractiveShell() | |
ip = IPython.core.ipapi.get() | |
p = IPython.core.debugger.Pdb(ip.colors) | |
p.reset() |
OlderNewer