Skip to content

Instantly share code, notes, and snippets.

View wecanspeak's full-sized avatar
💭
null

enzowang wecanspeak

💭
null
View GitHub Profile
@wecanspeak
wecanspeak / dumpTmuxColor
Created December 14, 2013 06:40
dump tmux color code
#!/bin/sh
printf "\n "
for i in {0..255} ; do
colcode="colour${i}"
printf "\x1b[38;5;${i}m%-10s " $colcode
if [ $((($i+1) % 8)) = 0 ] ; then
printf "\n "
fi
done
printf "\n"
@wecanspeak
wecanspeak / buildctags.sh
Created December 13, 2013 06:07
build tags for c program (via cscope and ctags)
#!/bin/sh
rm cscope.* tags
echo "rm cscope.* tags"
find . -name *.[ch] > cscope.tmp
echo "find . -name *.[ch] > cscope.tmp"
cscope -bqk -i cscope.tmp
echo "cscope -bqk -i cscope.tmp"
ctags -R
echo "ctags -R"
@wecanspeak
wecanspeak / svndiff
Created December 13, 2013 06:05
svn diff by vimdiff and rescue from multiple vim quits
#!/bin/sh
DIFF="/usr/bin/vimdiff"
LEFT=${6} # old file
RIGHT=${7} # new file
L_TITLE=${3} # file name and revision of old file
R_TITLE=${5} # file name and revision of new file
bold=`tput bold`
normal=`tput sgr0`