[zsh] cjgrep and socks connections
This commit is contained in:
parent
2fbe2993b5
commit
7851141a40
@ -102,6 +102,10 @@ jgrep () {
|
|||||||
find . -name .repo -prune -o -name .git -prune -o -type f -name "*\.java" -print0 | xargs -0 grep --color -n "$@"
|
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 () {
|
resgrep () {
|
||||||
for dir in `find . -name .repo -prune -o -name .git -prune -o -name res -type d`
|
for dir in `find . -name .repo -prune -o -name .git -prune -o -name res -type d`
|
||||||
do
|
do
|
||||||
@ -145,3 +149,13 @@ croot ()
|
|||||||
function zsh_stats() {
|
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
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user