-
Notifications
You must be signed in to change notification settings - Fork 1
/
aliases
71 lines (71 loc) · 1.96 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
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 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'
new_pandoc_wiki() {
F=`basename $1 | cut -d'.' -f1`
P=`echo $1 | sed 's/^.*vimwiki/\/data/g'`
docker run --rm -v "${HOME}/vimwiki:/data" -u $(id -u):$(id -g) pandoc/extra $P -o /data/output/$F.pdf --from markdown+yaml_metadata_block+raw_html --template eisvogel --table-of-contents --toc-depth 6 --number-sections --top-level-division=chapter --highlight-style breezedark --resource-path=.:/data/screenshots
mv ~/vimwiki/output/$F.pdf ~/Documents/
}
pandoc_wiki() {
cd ~ &> /dev/null
F=`basename $1 | cut -d'.' -f1`
pandoc -V geometry:margin=3cm -f markdown -t latex $1 -o ~/Documents/$F.pdf
cd - &> /dev/null
}
myvim() {
if [[ `screen -ls | grep "Detached" > /dev/null; echo $?` -eq 0 ]]; then
CMD="screen -r"
elif [[ `screen -ls | grep "Attached" > /dev/null; echo $?` -eq 0 ]]; then
CMD="screen -rD"
else
CMD="screen nvim -u ~/.vimrc"
fi
$CMD
}