Skip to content

Instantly share code, notes, and snippets.

View suderman's full-sized avatar

Jon Suderman suderman

View GitHub Profile
@suderman
suderman / mysql.sh
Created July 11, 2012 19:49
After brew install mysql
#!/bin/sh
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
mysql.server start
mkdir -p ~/Library/LaunchAgents
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
cp "$(brew --prefix mysql)/homebrew.mxcl.mysql.plist" ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
@suderman
suderman / statusline.vim
Created September 26, 2011 22:50
Scrooloose Statusline
"statusline setup
set statusline=%f "tail of the filename
"display a warning if fileformat isnt unix
set statusline+=%#warningmsg#
set statusline+=%{&ff!='unix'?'['.&ff.']':''}
set statusline+=%*
"display a warning if file encoding isnt utf-8
set statusline+=%#warningmsg#
@suderman
suderman / statusline-help.vim
Created September 20, 2011 15:40
Vim: StatusLine & Help
" Statusline {{{
" Functions {{{
" Statusline updater {{{
" Inspired by StatusLineHighlight by Ingo Karkat
function! s:StatusLine(new_stl, type, current)
let current = (a:current ? "" : "NC")
let type = a:type
let new_stl = a:new_stl
" Prepare current buffer specific text
@tkersey
tkersey / Undo a commit and redo
Created October 8, 2010 22:36
Git: undo a commit and redo
http://stackoverflow.com/questions/927358/git-undo-last-commit
Undo a commit and redo
$ git commit ...
$ git reset --soft HEAD^ (1)
$ edit (2)
$ git commit -a -c ORIG_HEAD (3)
This is most often done when you remembered what you just committed is incomplete, or you misspelled your commit message, or both. Leaves working tree as it was before "reset".