-
Notifications
You must be signed in to change notification settings - Fork 1
/
aliases
107 lines (107 loc) · 2.64 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
alias pdb3='python3 -m pdb'
alias vs='vagrant status'
alias vu='vagrant up'
alias vp='vagrant provision'
alias vd='vagrant destroy'
alias vss='vagrant ssh'
alias vh='vagrant halt'
alias vr='vagrant rdp'
alias mvdeploy='mvn clean package wildfly:deploy'
alias mvundeploy='mvn wildfly:undeploy'
alias mcp='mvn clean package'
alias vi='vim'
alias gf='git fetch'
alias grm='git rm'
alias gs='git status'
alias gb='git branch'
alias gd='git diff --color'
alias gdt='git difftool'
alias gc='git clone'
alias gconf='git config'
alias ginit='git init'
alias greset='git reset'
alias gst='git stash'
alias gch='git checkout'
alias gr='git remote -v'
alias gm='git merge'
alias gmt='git mergetool'
alias gl='git log --oneline --decorate --color --graph'
alias gc='git commit'
alias gp='git pull --rebase'
alias gP='git push'
alias ga='git add'
alias fabric='fab -H $H'
alias pbc='pbcopy'
alias pbp='pbpaste'
alias vim='nvim -u ~/.vimrc'
alias xcopy='xclip -i'
alias xpaste='xclip -o'
dockerws() {
docker run -it -v `pwd`:/ws ws
}
ctf() {
docker run -it -v `pwd`:/data ctf
}
title() {
echo -ne "\e]0;$1\a"
}
alias ll='ls -l'
alias la='ls -la'
alias lh='ls -lh'
alias ltr='ls -ltr'
alias psg='ps aux | grep'
start_gollum() {
if [ ! `pgrep gollum` ]; then
~/.gem/ruby/2.6.0/bin/gollum ~/vimwiki/ 2>&1 > ~/.vimwiki.log &
fi
}
pandoc_wiki() {
cd ~ &> /dev/null
pandoc -V geometry:margin=3cm -f markdown -t latex $1 -o ~/Documents/Report.pdf
cd - &> /dev/null
}
update_local_vimwiki() {
if [ $# -ne 1 ]; then
echo "Usage: update_local_vimwiki <user@system>"
echo "we will scp the ~/vimwiki dir from that user@system on top of our ~/vimwiki"
return 1
fi
cd ~/vimwiki &> /dev/null
scp -r $1:~/vimwiki/* .
cd - &> /dev/null
}
push_local_vimwiki() {
if [ $# -ne 1 ]; then
echo "Usage: push_local_vimwiki <user@system>"
echo "we will scp our local ~/vimwiki dir to user@system on top of their ~/vimwiki"
return 1
fi
scp -r ~/vimwiki/* $1:~/vimwiki/
}
shotmap_iterate() {
if [ ! -f $SHOTMAP ]; then
echo "1.1.1.1" > $SHOTMAP
fi
CURRENT_VAL=`cat $SHOTMAP`
if [ $# -eq 0 ]; then
DIGIT=4
else
DIGIT=$1
fi
if [ $DIGIT -eq 1 ]; then
TOP=""
else
TOP=`echo $CURRENT_VAL | cut -d'.' -f1-$(( $DIGIT - 1 ))`
fi
BOTTOM=$(( `echo $CURRENT_VAL | cut -d'.' -f $DIGIT` + 1 ))
if [ $DIGIT -eq 1 ]; then
FIXED_UPPER=`echo $BOTTOM`
else
FIXED_UPPER=`echo $TOP.$BOTTOM`
fi
PLACES_TO_FIX=$(( 4 - $DIGIT ))
for i in `seq 1 $PLACES_TO_FIX`; do
FIXED_UPPER="$FIXED_UPPER.1"
done
echo $FIXED_UPPER > $SHOTMAP
}