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
export NONE='' | |
export BLACK='\\033[0;30m' | |
export RED='\\033[0;31m' | |
export GREEN='\\033[0;32m' | |
export BROWN='\\033[0;33m' | |
export BLUE='\\033[0;34m' | |
export PURPLE='\\033[0;35m' | |
export CYAN='\\033[0;36m' | |
export LIGHT_GREY='\\033[0;37m' | |
export DARK_GREY='\\033[1;30m' |
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
#!/usr/bin/env ruby -w | |
## Using ruby's standard OptionParser to get subcommand's in command line arguments | |
## Note you cannot do: opt.rb help command | |
## other options are commander, main, GLI, trollop... | |
# run it as | |
# ruby opt.rb --help | |
# ruby opt.rb foo --help | |
# ruby opt.rb foo -q | |
# etc |
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/bash | |
#*******************************************************# | |
# Usage: pass in a file name | |
# Log things into a file in one consistent format # | |
# I needed to change IFS else newlines were getting hogged# | |
# 2009-10-10 09:46 changed rlwrap to use a tmp file | |
#and vim to edit. | |
#Also using an ex command to add text to top of file. | |
# Arunachalesha # |
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/bash | |
# | |
#################################### | |
# iTunes Command Line Control v1.0 | |
# written by David Schlosnagle | |
# created 2001.11.08 | |
# edit 2010.06.01 rahul kumar | |
#################################### | |
showHelp () { |
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
export ON_GRAY232='\\033[48;5;232m' | |
export ON_GRAY233='\\033[48;5;233m' | |
export ON_GRAY234='\\033[48;5;234m' | |
export ON_GRAY235='\\033[48;5;235m' | |
export ON_GRAY236='\\033[48;5;236m' |
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
#!/usr/bin/env ruby -w | |
###################################### | |
# A tiny wrapper over optparse that gives easy subcommand facility. | |
# It also neatly prints help for global and subcommands | |
# as well as summarizes subcommands in global help. | |
# | |
# For updated version, goto : http://github.com/rkumar/subcommand | |
# | |
# @author Rahul Kumar, Jun 2010 | |
# @date 2010-06-20 22:33 |
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
# get ansi color codes into environ | |
# source this file as . ~/bin/colormap.sh | |
# following codes copied from todo.txt | |
export NONE='' | |
export BLACK='\\033[0;30m' | |
export RED='\\033[0;31m' | |
export GREEN='\\033[0;32m' | |
export BROWN='\\033[0;33m' |
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
/* create tables to store itunes music library data for quick access | |
- rkumar 2010 July | |
*/ | |
drop table tracks; | |
create table tracks ( | |
album_artist VARCHAR(50), | |
album_rating_computed INTEGER, | |
album_rating VARCHAR(50), | |
album VARCHAR(50), | |
all_items VARCHAR(50), |
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/bash | |
# | |
# Dec 22, 2011 | |
# Display recent files from viminfo and prompt for editing | |
[ "$vim" ] || vim=vim | |
[ $viminfo ] || viminfo=~/.viminfo | |
usage="$(basename $0) [-a] [-l] [-[0-9]] [--debug] [--help] [regexes]" |
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
" Add this to your vimrc file | |
" auto-update "Last update: " if present whenever saving file | |
autocmd! BufWritePre * :call s:timestamp() | |
" to update timestamp when saving if its in the first 5 lines of a file | |
function! s:timestamp() | |
let pat = '\(Last update\s*:\s*\).*' | |
let rep = '\1' . strftime("%Y-%m-%d %H:%M") | |
call s:subst(1, 5, pat, rep) | |
endfunction |
NewerOlder