Last active
May 25, 2017 08:49
-
-
Save hub23/68fe33671364422567315fe94ecf88e0 to your computer and use it in GitHub Desktop.
Shell Config Snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ssh settings for x session | |
alias ssh-xcomp="ssh -XC -c blowfish-cbc,arcfour" | |
# ssh socks proxy | |
alias ssh-socks="ssh -D 1080" | |
# apt-get update, upgrade, dist-upgrade, clean, autoremove | |
alias update-full="sudo apt-get -qyf install \ | |
&& sudo dpkg --configure -a \ | |
&& sudo apt-get -qy update \ | |
&& sudo apt-get -qy upgrade \ | |
&& sudo apt-get -qy clean \ | |
&& sudo apt-get -qy autoremove" | |
# docker remove +1 week old containers | |
alias docker-rm-containers-plus1week="sudo docker ps -a | grep 'weeks ago' | awk '{print $1}' | xargs --no-run-if-empty docker rm" | |
# docker remove untagged containers | |
alias docker-rm-containers-untagged="sudo docker rm `docker ps --no-trunc -aq`" | |
# lazy remount share | |
alias share-remount="sudo umount -l /PATH/TO/SHARE; sudo mount -a" | |
# mount encrypted volume | |
alias crypt-mount="sudo cryptsetup open /PATH/TO/VOLUME NAME" | |
# umount encrypted volume | |
alias crypt-umount="sudo umount /dev/mapper/NAME; sudo cryptsetup luksClose keepass" | |
# change lan mac | |
alias macchanger-lan="sudo ifconfig enp0s25 down \ | |
&& sudo macchanger -r enp0s25 \ | |
&& sudo ifconfig enp0s25 up" | |
# change wlan mac | |
alias macchanger-wlan="sudo ifconfig wlp3s0 down \ | |
&& sudo macchanger -r wlp3s0 \ | |
&& sudo ifconfig wlp3s0 up" | |
# reset lan mac | |
alias macchanger-lan-reset="sudo ifconfig enp0s25 down \ | |
&& sudo macchanger -p enp0s25 \ | |
&& sudo ifconfig enp0s25 up" | |
# reset wlan mac | |
alias macchanger-wlan-reset="sudo ifconfig wlp3s0 down \ | |
&& sudo macchanger -p wlp3s0 \ | |
&& sudo ifconfig wlp3s0 up" | |
# simple netcat webserver | |
alias nc-httpd="while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; cat $1; } | sudo nc -l 80; done" | |
# nc rickroll | |
alias rickroll="nc rya.nc 1987" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment