david/myzsh
david
/
myzsh
Archived
1
0
Fork 0

pushzshconfig 12.01.2014 12:39

This commit is contained in:
david 2014-01-12 12:39:00 +01:00
parent 6c198443ae
commit 36776e05d3
1 changed files with 3 additions and 42 deletions

View File

@ -10,13 +10,8 @@ alias vt='vim $ZSH/themes/david.zsh && source ~/.zshrc'
alias vi="vim"
alias vless="/usr/share/vim/vim73/macros/less.sh"
alias publish="python2 -m SimpleHTTPServer"
alias curzon="ssh -l david localhost -p 2222"
alias joran="ssh -l david localhost -p 2223"
alias lela="ssh -l david localhost -p 2224"
alias torias="ssh -l david localhost -p 2225"
alias push="git push origin master"
alias pull="git pull origin master"
alias wiki="/opt/ruby1.9/bin/gollum --collapse-tree --user-icons gravatar --h1-title --no-live-preview --port 8000 --show-all /home/david/SparkleShare/wiki &; sleep 3; firefox -new-tab http://127.0.0.1:8000"
# Functions
pingscan()
@ -24,21 +19,6 @@ pingscan()
nmap -sP $@ | grep "Nmap"
}
vncconnect()
{
if [ -z $1 ]; then
echo "usage: vncconnect <remote-ip>"
exit 1
else
hostname=$1
echo "digging ssh tunnel to $hostname"; sleep 1
ssh $hostname -L 8900/localhost/5901 "sleep 05 && exit" &
sleep 02
vncviewer localhost:8900
echo "killed ssh tunnel to $hostname and ended vnc session"
fi
}
rdp()
{
@ -150,27 +130,8 @@ is_dirty() {
fi
}
info()
vpn()
{
echo -e "hostname: $(hostname)"
echo -e "dns server(s): "
nameservers=$(cat /etc/resolv.conf | grep --color=never nameserver | awk '{print $2}')
for server in $nameservers; do
echo -e "$server"
done
devices=$(ip link | awk '/^[0,2-9]*:/ {print $2}' | sed -e 's/: / /g' | sed -e 's/://g')
for device in $devices; do
ips=$(ip -f inet addr show dev $device | awk '/inet/ {print $2}')
echo -e "$device:"
for ip in $ips; do
echo -e "$ip, \c"
done
done
#ip -f inet addr | grep inet | grep -v 127.0.0.1 | awk {'print $2'}
#ip -f inet6 addr | grep inet6 | grep -v "::1/128" | grep -v "fe80:" | awk '{print $2}'
cd /home/david/.vpn
sudo openvpn --config *.ovpn
}