This file contains hidden or 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
# coding: utf-8 | |
# # this is an ipython notebook | |
# | |
# This is a markdown block that I can use to describe whatever I want to talk about. | |
# In[1]: | |
POSTGRES_URI = "postgresql+psycopg2://localhost:5432/steder" |
This file contains hidden or 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
import time | |
from boto.ec2.autoscale import AutoScaleConnection | |
def find_unused_launch_configs(): | |
conn = AutoScaleConnection() | |
autoscale_groups = conn.get_all_groups(max_records=100) | |
launch_configs = conn.get_all_launch_configurations(max_records=100) | |
launch_config_names = {lc.name for lc in launch_configs} |
This file contains hidden or 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
execve("/usr/bin/python", ["python", "test_geoip.py"], [/* 30 vars */]) = 0 | |
brk(0) = 0x1a2e000 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb1412ad000 | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=36559, ...}) = 0 | |
mmap(NULL, 36559, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fb1412a4000 | |
close(3) = 0 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) |
This file contains hidden or 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 | |
GOPATH=~/go/src | |
# Just include this function in your ~/.bashrc | |
function gof { | |
if (( $# == 0 )); then | |
echo "usage: $gof <dir>" | |
echo "jumps to $GOPATH/src directory matching <dir>" | |
return |
This file contains hidden or 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
# This is a little slow, so we cache it so we're not running a slow | |
# find on every terminal startup: | |
if [[ -e ~/.cache/zsh_exports_gnubin ]]; then | |
gnubins=(${(ps:\n:)"$(cat ~/.cache/zsh_exports_gnubin)"}) | |
else | |
gnubins=(${(ps:\n:)"$(find /usr/local/opt -type d -follow -name gnubin -print | tee ~/.cache/zsh_exports_gnubin)"}) | |
fi | |
for bindir in $gnubins; do | |
export PATH=$bindir:$PATH; |
OlderNewer