This guide assumes a fresh install of Mac OSX 10.7 Lion.
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
set grepprg=ack | |
set grepformat=%f:%l:%m | |
autocmd FileType make set noexpandtab | |
autocmd FileType python set noexpandtab | |
set hlsearch | |
let mapleader = "," |
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
#!/bin/bash | |
function flask-boilerplate-tmux | |
{ | |
# https://github.com/swaroopch/flask-boilerplate | |
BASE="$HOME/code/flask-boilerplate" | |
cd $BASE | |
tmux start-server | |
tmux new-session -d -s flaskboilerplate -n model |
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
import gevent | |
from gevent import monkey | |
monkey.patch_socket() | |
import hashlib | |
import os | |
import redis | |
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
~ $ mongo -u USERNAME -p PASSWORD Flame.mongohq.com:27094/wereviewutah | |
MongoDB shell version: 1.6.5 | |
connecting to: Flame.mongohq.com:27094/wereviewutah | |
> db.logs.find() | |
{ "_id" : ObjectId("4da0d8a5a130714ae1000023"), "count" : 1 } | |
> db.logs.findOne() | |
{ "_id" : ObjectId("4da0d8a5a130714ae1000023"), "count" : 1 } | |
> db.logs.update({}, {$inc:{count:1}}) | |
> db.logs.findOne() | |
{ "_id" : ObjectId("4da0d8a5a130714ae1000023"), "count" : 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
virtualenv --no-site-packages . | |
source bin/activate | |
bin/pip install tornado | |
bin/pip freeze > requirements.txt | |
mkdir app | |
git init | |
cat >.gitignore <<EOF | |
bin/ | |
include/ | |
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
" folding for Markdown headers, both styles (atx- and setext-) | |
" http://daringfireball.net/projects/markdown/syntax#header | |
" | |
" this code can be placed in file | |
" $HOME/.vim/after/ftplugin/markdown.vim | |
" In Markdown, setext-style overrides atx-style, so we first check for an | |
" underline. Empty lines should be ignored when underlined. | |
func! Foldexpr_markdown(lnum) | |
let l1 = getline(a:lnum) |
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
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 10/13/2011 | |
#################################### | |
sudo apt-get update | |
sudo apt-get upgrade |
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
# http://nodebox.metaforix.net/articles/debian-on-lenovo-thinkpad-t420 | |
#create new file /usr/share/X11/xorg.conf.d/99-my.conf | |
Section "InputDevice" | |
Identifier "Synaptics Touchpad" | |
Driver "synaptics" | |
Option "SendCoreEvents" "true" | |
Option "Device" "/dev/psaux" | |
Option "Protocol" "auto-dev" |
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
(def murmur | |
(let [m (com.google.common.hash.Hashing/murmur3_128)] | |
(fn ^Long [^String s] | |
(-> (doto (.newHasher m) | |
(.putString s com.google.common.base.Charsets/UTF_8)) | |
(.hash) | |
(.asLong))))) |
OlderNewer