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/sh -x | |
# -x prints every command before it executes it | |
# prints 3, 2, 1, 0 in the same location | |
echo -n " " | |
let i=3 | |
while [ ${i} -ge 0 ] | |
do | |
printf "\b${i}" | |
let i-=1 |
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
typedef struct list_node_s { | |
void *node; | |
int key; | |
} list_node_t; | |
list_node_t n; |
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
Host *.github.com | |
IdentityFile ~/.ssh/id_rsa-github | |
User shiva | |
Host *.work | |
IdentityFile ~/.ssh/id_rsa.work | |
User shiva |
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 the following 'help' target to your Makefile | |
# And add help text after each target name starting with '\#\#' | |
help: ## Show help | |
@IFS=$$'\n' ; \ | |
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##/:/'`); \ | |
printf "%-10s %s\n" "target" "help" ; \ | |
printf "%-10s %s\n" "------" "----" ; \ | |
for help_line in $${help_lines[@]}; do \ | |
IFS=$$':' ; \ |
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
sudo apt-get install libx11-dev libxt-dev python python2.7-dev | |
hg clone https://vim.googlecode.com/hg/ vim_source && cd vim_source && \ | |
./configure --disable-nls --enable-multibyte --with-tlib=ncurses \ | |
--enable-pythoninterp --enable-rubyinterp --with-features=huge && \ | |
make -j 3 && sudo make install |
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
! urxvt | |
URxvt*buffered: true | |
URxvt*cursorBlink: true | |
URxvt*underlineColor: yellow | |
URxvt*font: xft:inconsolata:size=10:antialias=true | |
URxvt*depth: 32 | |
URxvt*borderless: 1 | |
URxvt*scrollBar: false | |
URxvt*loginShell: true | |
Urxvt*secondaryScroll: true # Enable Shift-PageUp/Down in screen |
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
" Forget being compatible with good ol' vi | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/ | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required |
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
$ for d in `find . -name ".git"`; do \ | |
echo "processing $d ..."; \ | |
git --git-dir=$d --work-tree=$d/.. status; \ | |
done |
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
alias gen-cscope='find . -iname '\''*.c'\'' -o -iname '\''*.cpp'\'' -o -iname '\''*.cc'\'' -o -iname '\''*.h'\'' -o -iname '\''*.hpp'\'' > cscope.files && cscope -b -i cscope.files -f cscope.out' | |
alias gen-tags='ctags -R --c++-kinds=+p --fields=+iaS --extra=+q' |
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
alias remove-whitespace='sed -e '\''s/[[:blank:]]\+$//'\'' -i' | |
alias remove-ws-in-last-commit= 'for f in `git show --name-only --pretty=""`; do echo $f; remove-whitespace $f; done' |
OlderNewer