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 node | |
var request = require('request'), | |
fs = require('fs'), | |
Promise = require('bluebird'), | |
baseUrl = '', | |
patchName = process.argv[2].toString(), | |
formData = { | |
file0: fs.createReadStream(`/Users/skytap/src/current/ui_nodejs/.hg/patches/${patchName}`), | |
json: '{"parameter":[{"name":"ui_nodejs/.hg/patches/test_patch","file":"file0"}]}' | |
}; |
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
Download latest version of mac vim | |
https://github.com/b4winckler/macvim/releases | |
Install pathogen.vim(manages plugins) | |
http://www.vim.org/scripts/script.php?script_id=2332 | |
Install a theme possibly: | |
https://github.com/altercation/vim-colors-solarized | |
Install CtrlP |
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
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
" Ctrlp options | |
let g:ctrlp_root_markers = ['.ctrlp'] | |
let g:ctrlp_prompt_mappings = { | |
\ 'AcceptSelection("e")': ['<c-t>'], | |
\ 'AcceptSelection("t")': ['<cr>', '<2-LeftMouse>'], | |
\ } | |
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*.,*/.DS_Store,*/tmp/* |
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 _geocode(self, address, *args, **kwargs): | |
url = 'http://maps.googleapis.com/maps/api/geocode/json' | |
payload = { | |
'address': address+' '+self.state, | |
'sensor': 'false', | |
} | |
r = requests.get(url, params=payload) | |
if r.status_code == 200: | |
data = r.json |
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
function loadScript(url, callback){ | |
var script = document.createElement("script") | |
script.type = "text/javascript"; | |
if (script.readyState){ //IE | |
script.onreadystatechange = function(){ | |
if (script.readyState == "loaded" || | |
script.readyState == "complete"){ | |
script.onreadystatechange = null; |
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
<script type="text/javascript"> | |
var mediaQuery; | |
//checks for browser support ie < 10 no support | |
if(typeof window.matchMedia == 'function'){ | |
mediaQuery = window.matchMedia("(max-width: 767px)").matches; | |
}else{ | |
mediaQuery = false; | |
} | |
if (!mediaQuery) { |
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
Merge results into master | |
git push <app remote> master | |
heroku run bash --app <app-name> | |
python seatimes/manage.py syncdb | |
python seatimes/manage.py migrate people 0001 --fake | |
python seatimes/manage.py migrate legislators 0001 --fake |
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 atoi(text): | |
return int(text) if text.isdigit() else text | |
def natural_keys(name): | |
text = name['name'] | |
sortKey = [ atoi(c) for c in re.split('(\d+)', text) ] | |
try: | |
return sortKey[1],sortKey[0],sortKey[3] | |
except: |