# HG changeset patch # User Steve Losh # Date 1390927583 18000 # Node ID 761550d1394f16d68e804a925e375f6c122a4e93 # Parent 58517051b471418e5b7549188f7fa9a87d7b2d24 more shit diff -r 58517051b471 -r 761550d1394f bin/bootstrap.sh --- a/bin/bootstrap.sh Thu Jan 16 10:37:31 2014 -0500 +++ b/bin/bootstrap.sh Tue Jan 28 11:46:23 2014 -0500 @@ -43,10 +43,10 @@ ensure_link "lib/dotfiles/ffignore" ".ffignore" ensure_link "lib/dotfiles/ctags" ".ctags" ensure_link "lib/dotfiles/grc" ".grc" -ensure_link "lib/dotfiles/mutt/notmuch-config" ".notmuch-config" ensure_link "lib/dotfiles/bash_profile" ".bash_profile" ensure_link "lib/dotfiles/inputrc" ".inputrc" ensure_link "lib/dotfiles/fish/config.fish" ".config/fish/config.fish" ensure_link "lib/dotfiles/fish/functions" ".config/fish/functions" +echo remember to copy the notmuch-config echo completed diff -r 58517051b471 -r 761550d1394f bin/murder --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/murder Tue Jan 28 11:46:23 2014 -0500 @@ -0,0 +1,58 @@ +#!/bin/bash +# https://gist.github.com/anonymous/32b1e619bc9e7fbe0eaa + +# Signal numbers to use. Configurable, as long as the number of elements in this +# array matches the number of elements in $delays. +signals=(15 2 1 9) + +# How much time processes should be given to finish their work before we try the +# next signal. Configurable, as long as the number of elements in this array +# matches the number of elements in $signals. +delays=(4 6 8 0) + +# Takes a list of PIDs and ends the processes through increasingly rude means. +function mykill { + local ps='ps' + ps="$ps o pid=" + + # Figure out the names of the signals we will try. + local names=($(kill -l ${signals[@]})) + + local retval=0 + if [[ $# -eq 0 ]]; then + printf 'mykill: Too few arguments: %d\nmykill: Usage: mykill \n' $# + retval=1 + else + for pid in $@; do + local index=0 + # Try the next signal if the process is alive AND there are more + # signals to attempt AND the previous kill reported no errors. + while $ps $pid > /dev/null && [[ $index -lt ${#signals} ]] && [[ $retval -eq 0 ]]; do + output=$(kill -s ${signals[$index]} $pid 2>&1) + retval=$? + local killed=1 + # Give the process some time to finish. + sleep ${delays[$index]} + index=$(($index + 1)) + done + + if [[ -z $killed ]]; then + printf 'mykill: Process with PID %d does not exist.\n' $pid + + elif ! ${ps} ${pid} > /dev/null; then + index=$(($index - 1)) + printf 'mykill: Killed process with PID %d with signal %s (%d).\n' $pid ${names[$index]} ${signals[$index]} + + elif [[ ${retval} -ne 0 ]]; then + printf 'mykill: kill failed: %s\n' $(echo ${output} | cut -d ' ' -f 5-) + + elif [[ ${index} -eq ${#signals} ]]; then + printf 'mykill: Failed to kill process with PID %d with signals %s\n' $pid "$(echo ${names[@]})" + retval=-1 + fi + done + fi + return ${retval} +} + +mykill $@ diff -r 58517051b471 -r 761550d1394f bin/mutt-notmuch-py --- a/bin/mutt-notmuch-py Thu Jan 16 10:37:31 2014 -0500 +++ b/bin/mutt-notmuch-py Tue Jan 28 11:46:23 2014 -0500 @@ -1,1 +1,1 @@ -../../../src/mutt-notmuch-py/mutt-notmuch-py.py \ No newline at end of file +../../../src/mutt-notmuch-py/mutt-notmuch-py \ No newline at end of file diff -r 58517051b471 -r 761550d1394f dotcss/github.banksimple.com.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dotcss/github.banksimple.com.css Tue Jan 28 11:46:23 2014 -0500 @@ -0,0 +1,1 @@ +code { font-family: Menlo !important; } diff -r 58517051b471 -r 761550d1394f mutt/notmuch-config --- a/mutt/notmuch-config Thu Jan 16 10:37:31 2014 -0500 +++ b/mutt/notmuch-config Tue Jan 28 11:46:23 2014 -0500 @@ -11,7 +11,7 @@ # configured here named ".notmuch". # [database] -path=/Users/sjl/.mail/steve-stevelosh.com +path=/Users/sjl/.mail/simple # User configuration # @@ -31,7 +31,7 @@ [user] name=Steve Losh primary_email=steve@stevelosh.com -other_email=still.life@gmail.com;stilllife@gmail.com;sjl@pculture.org;steve@pculture.org;steve@ladyluckblues.com; +other_email=still.life@gmail.com;stilllife@gmail.com;sjl@pculture.org;steve@pculture.org;steve@ladyluckblues.com;sjl@simple.com;slosh@simple.com;slj@simple.com # Configuration for "notmuch new" # diff -r 58517051b471 -r 761550d1394f vim/after/plugin/paredit.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/after/plugin/paredit.vim Tue Jan 28 11:46:23 2014 -0500 @@ -0,0 +1,6 @@ +augroup unmap_paredit_bullshit + au! + + " Quit fucking with my split-line mapping, paredit. + au Filetype lisp nnoremap S i^mwgk:silent! s/\v +$//:noh`w +augroup END diff -r 58517051b471 -r 761550d1394f vim/custom-dictionary.utf-8.add --- a/vim/custom-dictionary.utf-8.add Thu Jan 16 10:37:31 2014 -0500 +++ b/vim/custom-dictionary.utf-8.add Tue Jan 28 11:46:23 2014 -0500 @@ -132,3 +132,17 @@ UTC MoneyDrop namespaces +DNS +hostname +VPC +AWS +EBS +ASG +Simple's +EC2 +Ubuntu +Stateful +stateful +tarball +S3 +spinup diff -r 58517051b471 -r 761550d1394f vim/vimrc --- a/vim/vimrc Thu Jan 16 10:37:31 2014 -0500 +++ b/vim/vimrc Tue Jan 28 11:46:23 2014 -0500 @@ -420,6 +420,23 @@ nnoremap Hd :Start! hg push default nnoremap Hu :Start! hg push upstream +" Zip Right +" +" Moves the character under the cursor to the end of the line. Handy when you +" have something like: +" +" foo +" +" And you want to wrap it in a method call, so you type: +" +" println()foo +" +" Once you hit escape your cursor is on the closing paren, so you can 'zip' it +" over to the right with this mapping. +" +" This should preserve your last yank/delete as well. +nnoremap zl :let @z=@"x$p:let @"=@z + " Easy filetype switching {{{ nnoremap _md :set ft=markdown