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
nnoremap <silent> <leader>gm :tab split<CR>:Glistmod<CR> | |
nnoremap <silent> <c-s-j> :call g:DiffNextLoc()<CR> | |
nnoremap <silent> <c-s-k> :call g:DiffPrevLoc()<CR> | |
command! Glistmod only | call g:ListModified() | Gdiff | |
function! g:ListModified() | |
let old_makeprg=&makeprg | |
let old_errorformat=&errorformat | |
let &makeprg = "git ls-files -m" | |
let &errorformat="%f" |
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
# `git merge-log` shows the commits that were introduced in a given merge | |
# `git merge-diff` shows the actual changes that were introduced by a given merge | |
# Both commands accept an optional commitish; if ommitted, the last merge commit is used | |
merge-span = "!f() { echo $(git log -1 $2 --merges --pretty=format:%P | cut -d' ' -f1)$1$(git log -1 $2 --merges --pretty=format:%P | cut -d' ' -f2); }; f" | |
merge-log = "!git log `git merge-span .. $1`" | |
merge-diff = "!git diff `git merge-span ... $1`" | |
merge-difftool = "!git difftool `git merge-span ... $1`" |
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
COFFEEC = coffee | |
SASSC = sass | |
HANDLEBARSC = handlebars | |
# Build app package | |
APPSRC = static/scripts/main.coffee | |
APPOBJ = ${APPSRC:.coffee=.js} | |
APPOUT = static/scripts/app.js |
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
" PLEASE NOTE: I'm assuming nvim defaults in this configuration. | |
" Regular vimmers might need to tweak here and there. | |
" Add autogenerated tags file to the lookup path. | |
set tags+=.git/tags | |
" Add fzf plugin. | |
set rtp+=/usr/local/opt/fzf | |
" Use a source for FZF that respects '.gitignore'. |
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
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |