Skip to content

Instantly share code, notes, and snippets.

@henryalee
henryalee / gist:6324953
Created August 23, 2013 23:25
better ctrl-p ignore
" let g:ctrlp_by_filename = 1
" let g:ctrlp_match_window_bottom = 0
" let g:ctrlp_match_window_reversed = 0
" let g:ctrlp_max_depth = 40
" let g:ctrlp_max_height = 50
" let g:ctrlp_max_files = 0
" Sane Ignore For ctrlp https://github.com/kien/ctrlp.vim/issues/313
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.hg$\|\.svn$\|\.yardoc\|public\/images\|public\/system\|data\|log\|tmp$',
@henryalee
henryalee / .gitconfig
Created June 21, 2013 17:21
My .gitconfig with colors and shortcuts and stuff.
[user]
name = Henry A. Lee
email = henry.a.lee@gmail.com
[alias]
st = status
cm = commit
br = branch
co = checkout
d = diff
dc = diff --cached
@henryalee
henryalee / MongoDB Install and AutoStart
Last active November 21, 2017 03:20
Install mongodb with homebrew and set it to autostart
brew install mongo
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/mongodb/2.2.0-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
# Mongo might be named differently, try this
cp /usr/local/Cellar/mongodb**/**/*plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/*mongo*plist
@henryalee
henryalee / gist:3344870
Created August 13, 2012 23:40
partial progress on mixpanel tracking
diff --git a/app/controllers/api/stores/sessions_controller.rb b/app/controllers/api/stores/sessions_controller.rb
index e87ce01..34c0f62 100644
--- a/app/controllers/api/stores/sessions_controller.rb
+++ b/app/controllers/api/stores/sessions_controller.rb
@@ -5,6 +5,7 @@ module Api
include Devise::Controllers::InternalHelpers
before_filter :ensure_params_exist
+ after_filter :mixpanel_track, :only => [:create]
@henryalee
henryalee / .gitconfig
Created August 13, 2012 18:49
.gitconfig that makes git commands a little nicer
[user]
name = Henry A. Lee
email = henry.a.lee@gmail.com
[github]
user = henryalee
token = ...
[alias]
st = status
cm = commit
br = branch