[zsh] cjgrep and socks connections

This commit is contained in:
Mathieu Maret 2014-12-22 16:22:01 +01:00 committed by Mathieu Maret
parent 2fbe2993b5
commit 7851141a40
1 changed files with 14 additions and 0 deletions

View File

@ -102,6 +102,10 @@ jgrep () {
find . -name .repo -prune -o -name .git -prune -o -type f -name "*\.java" -print0 | xargs -0 grep --color -n "$@"
}
cjgrep () {
find . -name .repo -prune -o -name .git -prune -o -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.h' -o -name '*.hpp' -o -name "*.java" \) -print0 | xargs -0 grep --color -n "$@"
}
resgrep () {
for dir in `find . -name .repo -prune -o -name .git -prune -o -name res -type d`
do
@ -145,3 +149,13 @@ croot ()
function zsh_stats() {
fc -l 1 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
}
function secure_chromium {
echo "make sure to have run \"ssh -TND 4711 $USER@host\" before"
port=4711
export SOCKS_SERVER=localhost:$port
export SOCKS_VERSION=5
chromium-browser &
exit
}