77 lines
1.6 KiB
Bash
77 lines
1.6 KiB
Bash
# Aliases
|
|
alias zz='source ~/.zshrc'
|
|
alias vz='vim ~/.zshrc && source ~/.zshrc'
|
|
alias vp='vim ~/.oh-my-zsh/custom/plugins/david/david.plugin.zsh && source ~/.zshrc'
|
|
alias vt='vim ~/.oh-my-zsh/custom/david.zsh-theme && source ~/.zshrc'
|
|
alias ll="ls -l"
|
|
alias la="ls -la"
|
|
alias vi="vim"
|
|
alias vless="/usr/share/vim/vim73/macros/less.sh"
|
|
alias publish="python2 -m SimpleHTTPServer"
|
|
|
|
alias tmhk="~/Code/scripts/mount_kitt_and_start_tomahawk.sh"
|
|
|
|
alias ghost="rdesktop -0 -d aec.at -u david -p - -f -k de 10.9.0.38"
|
|
|
|
alias davidwiki="cd ~/SparkleShare/david; gollum --no-live-preview --host localhost --port 8888"
|
|
|
|
# Functions
|
|
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()
|
|
{
|
|
|
|
if [ -z $1 ]; then
|
|
echo -e "server: \c"
|
|
read server
|
|
else
|
|
server=$1
|
|
fi
|
|
|
|
echo -e "username [hubertus]: \c"
|
|
read username
|
|
if [ -z $username ]; then
|
|
username="hubertus"
|
|
fi
|
|
|
|
echo -e "domain [aec.at]: \c"
|
|
read domain
|
|
if [ -z $domain ]; then
|
|
domain="aec.at"
|
|
fi
|
|
|
|
rdesktop -u $username -p - -d $domain -g 1280x720 $server
|
|
|
|
}
|
|
|
|
updatezshconfig()
|
|
{
|
|
cd ~/.oh-my-zsh/custom
|
|
git pull origin master
|
|
cd -
|
|
}
|
|
|
|
pushzshconfig()
|
|
{
|
|
|
|
cd ~/.oh-my-zsh/custom
|
|
git commit -am "pushzshconfig commit date $(date "+%d.%m.%Y %H:%M")"
|
|
git push origin master
|
|
cd -
|
|
|
|
}
|
|
|