Skip to content

Instantly share code, notes, and snippets.

View gaving's full-sized avatar
🎯
Focusing

Gavin Gilmour gaving

🎯
Focusing
View GitHub Profile
/cygdrive/h/.zshrc:limit:16: no such resource: coredumpsize
/cygdrive/h/.zshrc:[:66: too many arguments
public function get${1:name}() {
return $this->${2:`substitute('$1', '^\(.\)', '\=tolower(submatch(1))', '')`};
}
set guifont=Consolas:h10:cDEFAULT
function! ToggleXHTML()
if &ft != 'xhtml'
let s:oldFileType = &ft
set ft=xhtml
else
if exists('s:oldFileType')
let &ft=s:oldFileType
else
echo "No previous filetype"
endif
@gaving
gaving / junk
Created December 4, 2009 09:35
map <A-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
let g:dbext_default_DBI_orientation = 'vertical'
let g:dbext_default_window_use_horiz = 0
let g:dbext_default_window_width=80
let g:fuf_file_exclude = '\v\~$|CVS|\.(o|exe|bak|swp)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])'
nmap s ysw
nmap S ysW
zmodload -i zsh/parameter
insert-last-command-output() {
LBUFFER+="$(eval $history[$((HISTCMD-1))])"
}
zle -N insert-last-command-output
bindkey "^X^L" insert-last-command-output
if [[ -x `which lesspipe.sh` ]]; then
export LESS="-R -M --shift 5"
export LESSOPEN="|lesspipe.sh %s"
export LESSCOLOR=1
fi
gcc48540:~/Dotfiles% git pull
walk 0430e42888e8de6593def99d3eb3fcdeb424e631
error: unable to set permission to '.git/objects/0a/e557d73c6404c7c7aa65e1cbc23531ad78ad99'
error: unable to write sha1 filename .git/objects/0a/e557d73c6404c7c7aa65e1cbc23531ad78ad99
Getting pack list for http://github.com/gaving/dotfiles.git
Getting alternates list for http://github.com/gaving/dotfiles.git
error: Unable to find 0ae557d73c6404c7c7aa65e1cbc23531ad78ad99 under http://github.com/gaving/dotfiles.git
Cannot obtain needed tree 0ae557d73c6404c7c7aa65e1cbc23531ad78ad99
while processing commit 0430e42888e8de6593def99d3eb3fcdeb424e631.
fatal: Fetch failed.
tpcp() {
gca -m $1 && gp tayside master && tpc
}
tpc() {
LATEST_COMMIT=$(git log 2>/dev/null | head -n1 | awk '{print $2}')
REPOSITORY_URL=$(grep url 2>/dev/null .git/config)
REPOSITORY_NAME=${REPOSITORY_URL##*/}
[[ -n $LATEST_COMMIT ]] && cygstart http://tpscope/gg5052661/software/gitphp/index.php\?p\=${REPOSITORY_NAME}\&a\=commitdiff\&h\=${LATEST_COMMIT}
}
set wildignore+=*.toc,*.aux,*.dvi,*.log