From 7851141a4023e8ae4c678e79b28a0df19ed96306 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Mon, 22 Dec 2014 16:22:01 +0100 Subject: [PATCH] [zsh] cjgrep and socks connections --- .zsh/40_function.zsh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.zsh/40_function.zsh b/.zsh/40_function.zsh index c15e91d..7e1400b 100755 --- a/.zsh/40_function.zsh +++ b/.zsh/40_function.zsh @@ -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 +} +