Skip to content

Instantly share code, notes, and snippets.

@pbhandari
pbhandari / pre-commit
Last active July 24, 2019 01:17
pre commit hook for running pylint
#!/bin/sh
# Make sure that we're in the right virtualenv (otherwise pylint isn't going to work properly)
DESIRED_VENV=compass
if [ -z $VIRTUAL_ENV ] || [ "`basename $VIRTUAL_ENV`" != "$DESIRED_VENV" ]; then
echo You\'re not in the $DESIRED_VENV virtualenv, \`workon $DESIRED_VENV\` to fix.
exit 1
fi
# Warn if pylintrc can't be found at the top-level directory
@pbhandari
pbhandari / orq-config.vim
Last active August 29, 2015 14:08
orq development for vim and syntastic
function! SetupEnvironment()
let l:path = expand('%:p')
if l:path =~ '~/code/orq'
if &filetype != 'cpp' && &filetype != 'h'
return
endif
let g:syntastic_cpp_check_header = 1
let g:syntastic_cpp_auto_refresh_includes = 1
let g:syntastic_cpp_no_include_search = 0
@pbhandari
pbhandari / local_pass.sh
Last active August 29, 2015 14:07
A very simple local password manager
#!/usr/bin/sh
pass_file=$HOME/local_pass.gpg
recpt_name='CHANGE_ME'
if [ x"$recpt_name" = x'CHANGE_ME' ]; then
echo "Change the recpt_name to the email of your secret key"
exit 1
fi

Keybase proof

I hereby claim:

  • I am pbhandari on github.
  • I am pbhandari (https://keybase.io/pbhandari) on keybase.
  • I have a public key whose fingerprint is D553 21B6 C388 981E 0A81 CCB0 438F 5F1D 67D5 5E74

To claim this, I am signing this object: