Skip to content

Instantly share code, notes, and snippets.

View jsplink's full-sized avatar
🖤

John jsplink

🖤
  • San Francisco, CA
View GitHub Profile
import os
import psycopg2
import psycopg2.extras
from psycopg2 import ProgrammingError
from psycopg2 import OperationalError
from controllers.settings import test_connection as TEST_CONN
from controllers.settings import connection as CONN
from controllers.settings import cursor_composites
@jsplink
jsplink / gist:7b6bd84081c481714dcb
Last active August 29, 2015 14:17
.bash_profile
# Specifically for MaxOSX
# ==================
# TERMINAL CONFIGS
# ==================
# color scheme
PS1='\[\033[0;32m\]\u@\h\[\033[0;36m\] \w\[\033[00m\]: '
# bash history modifications
shopt -s histappend
@jsplink
jsplink / postmkvirtualenv
Last active August 29, 2015 14:17
postmkvirtualenv
#!/bin/bash
# This hook is sourced after a new virtualenv is activated.
#rvm ruby do rvm gemset create ${PROJECT_RVM_ENV};
ruby do rvm gemset create ${PROJECT_RVM_ENV};
pip install nodeenv;
nodeenv -p;
mkdir ~/projects/${PROJECT_NAME}
touch ~/projects/${PROJECT_NAME}/todo.stml
cat > ~/projects/${PROJECT_NAME}/${PROJECT_RVM_ENV}.sublime-project <<DELIM
{
@jsplink
jsplink / bash_profile
Last active August 29, 2015 14:17
bash_profile
# Specifically for MaxOSX
# ==================
# TERMINAL CONFIGS
# ==================
# color scheme
PS1='\[\033[0;32m\]\u@\h\[\033[0;36m\] \w\[\033[00m\]: '
# bash history modifications
shopt -s histappend
@jsplink
jsplink / postactivate
Last active August 29, 2015 14:17
postactivate
#!/bin/bash
# This hook is sourced after every virtualenv is activated.
export PROJECT_NAME=${VIRTUAL_ENV#$WORKON_HOME/};
export PROJECT_PATH=/Users/${USER}/repos/${PROJECT_NAME};
export PROJECT_RVM_ENV=`echo $PROJECT_NAME | sed 's,[/-_],,g'`;
# override path to...
# (1) setup rvm and
# (2) pyenv and
# (3) virtualenv binaries
@jsplink
jsplink / postdeactivate
Created March 26, 2015 22:39
postdeactivate
#!/bin/bash
# This hook is sourced after every virtualenv is deactivated.
source ~/.bash_profile;
Better CoffeeScript
Bootstrap 3 Jade Snippets # (T) document, not used
Bootstrap 3 Snippets # (T) use more
Color Highlighter
Cucumber
Emmet
Handlebars
JSON Reindent # (T) remove, using npm install -g prettyjson
Javascript Beautity # (T) remove
JsFormat # (T) remove
@jsplink
jsplink / package.json
Last active August 29, 2015 14:18
project startup guide
# Assumption: virtualenv hooks are all setup
PROJECT_NAME = 'obimod/myproject'
mkvirtualenv ${PROJECT_NAME}
pip install nodeenv
nodeenv -p
# TODO: Add in package.json now
npm install -g
npm link
@jsplink
jsplink / install_utils.sh
Created May 7, 2015 19:53
misc_machine_setup
brew tap jingweno/ccat
brew install ccat
@jsplink
jsplink / extMerge
Created June 5, 2015 21:40
/usr/local/bin/extMerge
#!/bin/sh
/Applications/p4merge.app/Contents/MacOS/p4merge $*