diff options
author | Laurent Ghigonis <laurent@p1sec.com> | 2013-03-25 18:56:08 +0100 |
---|---|---|
committer | Laurent Ghigonis <laurent@p1sec.com> | 2013-03-25 18:56:08 +0100 |
commit | 30739d96e2a23e00a544396e8e3b5d04ceacd90e (patch) | |
tree | 5f6fb7f915285e4ac7fa6358f52ab5a0beb7c303 | |
parent | add viensamoi - WIFI tools targeting clients (diff) | |
parent | conf/bashrc: final version of gitpush1_branch (diff) | |
download | laurent-tools-30739d96e2a23e00a544396e8e3b5d04ceacd90e.tar.xz laurent-tools-30739d96e2a23e00a544396e8e3b5d04ceacd90e.zip |
Merge branch 'master' of zx2c4.com:laurent-tools
-rw-r--r-- | conf/Makefile | 2 | ||||
-rw-r--r-- | conf/bashrc-laurent-public (renamed from conf/bashrc-public) | 21 | ||||
-rwxr-xr-x | tools/switch_wireshark_fedora.sh | 25 |
3 files changed, 36 insertions, 12 deletions
diff --git a/conf/Makefile b/conf/Makefile index 17ff59a..8dfeb4d 100644 --- a/conf/Makefile +++ b/conf/Makefile @@ -1,2 +1,2 @@ deploy: - install -m 750 bashrc-public ~/.bashrc-public + ln -s `readlink -f bashrc-laurent-public` ~/.bashrc-laurent-public diff --git a/conf/bashrc-public b/conf/bashrc-laurent-public index 1569bf0..1196490 100644 --- a/conf/bashrc-public +++ b/conf/bashrc-laurent-public @@ -1,5 +1,6 @@ # -# PUBLIC +# PUBLIC bashrc +# <laurent@p1sec.com> # export EDITOR="vim" @@ -9,7 +10,7 @@ alias g='grep -RIs --color=auto' alias j='jobs' alias p='pwd' alias ls='ls -F' -alias l='ls -F' +alias l='ls -AliF' function cl() { cd $@; ls; } alias le='less -r' alias pg='pgrep -lf' @@ -64,24 +65,21 @@ function tshr() { host=$1 iface=$2 filter=${3-"not port 22"}; f=/tmp/tshr-fifo; function wpasup() { ifran $1; sudo wpa_supplicant -Dwext -i$1 -c/etc/wpa_supplicant/wpa_supplicant.conf; } function wpasup_ferber() { ifran $1; sudo wpa_supplicant -Dwext -i$1 -c/etc/wpa_supplicant/wpa_supplicant-ferber.conf; } function wpasup_noconf() { ifran $1; sudo wpa_supplicant -Dwext -i$1 -c/etc/wpa_supplicant/wpa_supplicant-empty.conf; } -alias alie='vim ~/.bashrc' -alias alir='. ~/.bashrc' +alias alie='vim ~/.bashrc-laurent-public' +alias alir='. ~/.bashrc-laurent-public' alias usee='vim ~/perso/USEFULL_COMMANDS' alias xbindkeys-reload="pkill xbindkeys; xbindkeys" alias tn='tmux new-session -s' alias ta='tmux attach' function now() { while read line; do echo -e "`date ${1:++"$1"}` $line"; done } -function htod() { echo "ibase=16; $1" | bc; } -function dtoh() { echo "obase=16; $1" | bc; } - alias pingg='ping google.com' alias pingx='ping 8.8.8.8' alias pingxi='ping -i4 8.8.8.8' -alias gitl='git log --color=always --name-only' -alias gitlu='git log --color=always -u' -alias gitd='git diff --color=always' +alias gitl='git log --color --name-only' +alias gitlu='git log --color -u' +alias gitd='git diff --color' function gitc() { git branch |grep "* master" || (git branch; read a); git diff $@|less; git commit $@; } alias gitcount='git log |egrep "^commit" |wc -l' alias gitb='git branch' @@ -91,7 +89,8 @@ alias gitpull='git pull' alias gitsync='git pull; git push' alias gitsta='git stash' alias gitstap='git stash pop' -function gitpush1() { git log |egrep "^commit .*" |awk "{print \$2} /^commit $1$/ {exit}" |tac |while read c; do cmd="git push origin $c:`git rev-parse --abbrev-ref HEAD`"; echo $cmd; $($cmd) ||exit; done } +# Pushes commits 1by1. Only works if noone has commited before you. Good if you do dev in your own branch. +function gitpush1_branch() { branch=`git rev-parse --abbrev-ref HEAD`; git log origin/$branch..$branch |egrep "^commit .*" |awk "{print \$2} /^commit $1$/ {exit}" |tac |while read c; do cmd="git push origin $c:$branch"; echo $cmd; $($cmd) ||exit; done } alias dhk='sudo pkill -f dhcpcd' alias dhc='sudo dhcpcd' diff --git a/tools/switch_wireshark_fedora.sh b/tools/switch_wireshark_fedora.sh new file mode 100755 index 0000000..9b97a8f --- /dev/null +++ b/tools/switch_wireshark_fedora.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# Switch between svn and yum package installation of wireshark + +wirsrc="$HOME/src/wireshark/" +wirpkg="wireshark wireshark-devel wireshark-gnome" + +if [ $# -lt 1 ]; then + echo "usage: `basename $0` svn|pkg" + exit 1 +fi + +set -x + +if [ $1 == "svn" ]; then + sudo yum remove $wirpkg + cd $wirsrc + make -j 4 + sudo make install +elif [ $1 == "pkg" ]; then + cd $wirsrc + sudo make uninstall + sudo yum install $wirpkg + sudo usermod -a -G wireshark `whoami` +fi |