Skip to content

Instantly share code, notes, and snippets.

View alvinfrancis's full-sized avatar

Alvin Francis Dumalus alvinfrancis

View GitHub Profile
@alvinfrancis
alvinfrancis / tmux-newsbeuter-open.sh
Created August 1, 2013 10:44
newsbeuter open browser script in tmux
#!/bin/sh
shellbrowser='elinks'
tmux_current_window=`tmux display-message -p "#W"`
tmux_current_pane=`tmux display-message -p "#P"`
# Check if in the right tmux window
if [ $tmux_current_window != 'news' ];then
elinks $1
exit 0
@alvinfrancis
alvinfrancis / sqlformat.vim
Last active December 19, 2015 17:28
Simple VimL-Python script that uses sqlformat.org to format the selected string
" format SQL using sqlformat.org
function! SQLFormat() " {{{
'<,'>python << EOF
import vim
import urllib2, urllib, json
sql = ' '.join(vim.current.range)
params = {'sql': sql,
'n_indents': 4,
'keyword_case': 'upper',
'reindent': 1}