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
#! /bin/bash | |
# First you need to have the "pgbackups" addon in your heroku app, for example: | |
# $ heroku addons:add pgbackups:auto-week | |
# your database name here | |
DB_NAME='foobar_development' | |
# grab the data directory for postgres from the running process | |
DATA_DIR=`ps ax |grep [/]post | sed "s/^.*\-D //" | sed "s/ .*$//"` |
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
" Get coffeelint errors in the vim quickfix menu | |
" requires coffeelint to be installed and in the path | |
" http://www.coffeelint.org/ | |
" lint the current file | |
function! CoffeeLintFile() | |
let current = fnamemodify(expand("%"), ':p') | |
call CoffeeLintAnalyze(current) | |
endfunction |
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
export PS1='\[\e[35;40m\]\h:\[\e[36;40m\]\W\[\e[32;40m\]$(__git_ps1 "(%s)") \[\e[33;40m\]\$\[\e[0m\] ' |
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
alias gru='git remote show | sed '\''/heroku/d'\'' | xargs -I {} git remote update {} --prune' |
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
function! FindOrCreateAlternate() | |
let buflist = [] | |
let bufcount = bufnr("$") | |
let currbufnr = 1 | |
let altname = AlternateFileName() | |
while currbufnr <= bufcount | |
if(buflisted(currbufnr)) | |
let currbufname = bufname(currbufnr) | |
let curmatch = tolower(currbufname) |
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
# | |
# rspec shared examples for standard resource post to /create handling | |
# | |
# usage: | |
# it_should_behave_like "handles POST create" | |
# | |
# good idea or bad? | |
# | |
shared_examples_for 'handles POST create' do | |
before :all do |
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
names = db.getCollectionNames(); for (var i = 0; i < names.length; i++) { if (names[i].substring(0,4) =='tmp.') { print(names[i]); db.getCollection(names[i]).drop(); }} |
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
| | |
* commit aa1e16dfb818f2e7b5c27883aad5ccfa14eea4da | |
| Author: Dave Foley <[email protected]> | |
| Date: Sun Mar 27 07:07:42 2011 -0400 | |
| | |
| fixing stupid 6AM bug | |
| | |
* commit 46f5a2bff1199ec7004589550c33410548c65647 | |
| Author: Dave Foley <[email protected]> | |
| Date: Sun Mar 27 07:06:49 2011 -0400 |
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
// Replace App with your root namespace name. | |
// | |
// use like: | |
// App.declare('foo.bar.baz', function(){}); | |
// App.foo.bar.baz(); | |
// or | |
// App.declare('some.namespaceName', {foo : function(){}, bar:function(){}}); | |
// App.some.namespaceName.foo(); | |
var App = {}; |
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
" flog wrappers | |
function! FlogFile() | |
let current = fnamemodify(expand("%"), ':p') | |
call FlogAnalyze(current) | |
endfunction | |
function! FlogAll() | |
call FlogAnalyze('app lib -g') | |
endfunction |