-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases
90 lines (73 loc) · 2.89 KB
/
.aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Better defaults
alias ll="clear && exa -bghHliS"
alias la="ls -A"
alias ls1="find . -name *"
alias p="pgrep -l"
alias du="du -hs"
alias df="df -hT"
alias grep="grep --color=auto"
alias dirdiff="diff -b -r -w"
alias gdb="gdb -q"
alias dmesg="dmesg --color --ctime"
alias fd="fd -H"
alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to pasteboard.'"
alias pb="nc termbin.com 9999"
alias please='sudo $(fc -ln -1)'
alias s="sudo systemctl"
alias j="sudo journalctl"
alias connections='ss -rtp'
alias ed='goland'
alias g='goland'
# apt
alias apti="sudo apt-get install"
alias aptp="apt-cache policy"
alias apts="apt-cache search"
alias why="apt-cache rdepends --installed"
# Time
alias today="date +%Y-%m-%d"
# Bundler
alias bu="bundle"
alias be="bundle exec"
alias rs="bundle exec rspec --color --drb --drb-port 8989 --format documentation"
# VMs
alias qemu="sudo qemu-system-x86_64 -enable-kvm -redir tcp:2222::22 -vga std"
alias ubuntu="qemu -m 1024 -hda Virtual/pompeii-ubuntu.img -smp cores=1,threads=2,sockets=1 -vga vmware"
# most basic git stuff that I'm used to
alias gst="git status -sb"
alias gg="git grep"
# python helpers
alias activate='source $(find . -name activate)'
# valgrind helpers
alias vmem="valgrind --tool=cachegrind"
alias vthreads="valgrind --tool=helgrind --verbose"
alias vcalls="valgrind --tool=callgrind --branch-sim=yes --cacheuse=yes --verbose"
alias vleaks="valgrind --tool=memcheck --leak-check=full --show-reachable=yes --num-callers=20 --track-fds=yes"
# docker
alias dka="docker kill $(docker ps -q)"
alias dc="docker-compose"
alias dri="docker run -it"
alias mutt="neomutt"
# globals (zsh only)
alias -g no="--name-only"
alias -g lc='$(docker ps -l -q)'
alias -g li='$(docker image ls -q | head -1)'
alias -g nt="':(exclude)*_test.go' ':(exclude)*_tests.yml' ':(exclude)*managedschemas*'" # for git grep: git grep <pattern> nt
#
# Some of the following are mostly cheat sheets for future reference
#
# Tcpdump helpers (mostly for remind purposes)
alias capture-user-agents="sudo tcpdump -nn -A -s1500 -l | grep \"User-Agent:\""
alias capture-get-requests="sudo tcpdump -s0 -A -vv 'tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420'"
alias capture-plaintext-passwords="sudo tcpdump port http or port ftp or port smtp or port imap or port pop3 or port telnet -l -A | egrep -i -B5 'pass=|pwd=|log=|login=|user=|username=|pw=|passw=|passwd=|password=|pass:|user:|username:|password:|login:|pass |user '"
alias capture-dns="sudo tcpdump -s0 port 53"
# use like: capture host apple.com or port 8080...
alias capture"sudo tcpdump -s0 -XX -nn -i eth0"
# Nmap
alias scan-local-net="nmap -vvv -sn -sL 192.168.1.0/16"
alias disk-stat="bwm-ng -i ioservice"
alias aes-encrypt="gpg --cipher-algo AES256 -c"
alias aes-decrypt="gpg --decrypt"
alias disable-puppet="sudo puppet agent -t --disable"
alias external-ip='curl ipinfo.io/ip'
alias genpass="openssl rand -base64 20"
alias tf="terraform"