-
Notifications
You must be signed in to change notification settings - Fork 3
/
aliases
107 lines (85 loc) · 3.57 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
# Expand Alias
# Normal: <Esc>:_expand_alias
# Insert: <C-x>a
alias ..="cd .."
alias fix_suspend="sudo systemctl cancel; sudo systemctl stop systemd-suspend.service"
alias gs="git status || ll"
alias gp="git pull"
alias gb="git branch"
alias gc="git commit"
alias gca="git commit --amend"
alias ga="git add"
alias gl="git log"
alias glp="git --no-pager log --oneline -n30"
alias gco="git checkout"
alias gcob="git checkout -b"
alias gd="git diff"
alias gds="git diff --staged"
alias gc-="git checkout -"
alias gsl="git stash list"
alias gsa="git stash apply"
alias gcp="git cherry-pick"
alias got="git"
# edit git diff
alias egd="git diff --name-only | xargs $EDITOR"
alias egds="git diff --staged --name-only | xargs $EDITOR"
# git clear merged branches
alias gcmb="git branch --merged | grep -Ev '(^\*|master)' | xargs git branch -d"
alias rdb="socat readline tcp:"
alias tma="tmux a -t"
# fixes pip install smart_open[s3] in zsh
alias pip='noglob pip'
alias pip3='noglob pip3'
alias v="nvim"
alias vi="nvim"
alias prov="v --cmd 'profile start vim_profile.log' --cmd 'profile func *' --cmd 'profile file *'"
alias dots="cd ~/dev/dotfiles"
alias dev="cd ~/dev"
alias docs="cd ~/Documents"
alias dls="cd ~/Downloads"
alias mcs="cd ~/dev/management_command_system; pactivate; fnm use v18.20.0"
alias ebank="workon exploitmebank; cd ~/dev/exploitmebank/ExploitMe_Bank"
alias ebank3="workon ebank3; cd ~/dev/exploitmebank/ExploitMe_Bank"
alias csec="workon csec; cd ~/dev/checksec"
alias djsec="workon djangosec; cd ~/dev/django-security"
alias csd="cd ~/dev/sdelements/sigma; pactivate; fnm use v18.20.0"
alias cst="cd ~/dev/sdetools; pactivate"
alias cpca="cd ~/dev/project-creation-automation; pactivate"
alias cpkg="cd ~/.cache/pypoetry/virtualenvs/sdelements-FOqhXTaE-py3.8/lib/python3.8/site-packages"
alias cperft="cd ~/dev/perft"
alias ec="cd ~/dev/EquipmentCloud"
alias nds="node devServer.js"
alias yd="yarn dev"
alias ys="yarn start"
alias yb="yarn build"
alias ycc="yarn cache clean"
alias djrs="./manage.py runserver 0.0.0.0:8000"
alias djm="./manage.py migrate"
alias djmk="./manage.py makemigrations"
alias djc="./manage.py collectstatic --noinput"
alias djsh="./manage.py shell_plus"
alias tst="./manage.py test --settings=test_local_settings --nomigrations"
alias tstci="./manage.py test --settings=test_local_settings --failfast --noinput -v 2 --parallel 2"
alias pytst="pytest --no-migrations"
alias mailserv="python3 -m smtpd -n -c DebuggingServer localhost:1025"
alias start_celery="celery -A celery_mod worker -l debug"
alias pas_celery="COMMAND_INPUT_FILE_FOLDER=~/dev/management_command_system/dev_test_folder/input COMMAND_OUTPUT_FILE_FOLDER=~/dev/management_command_system/dev_test_folder/output celery worker --app=pas_celery_mod -l info -Q command_worker.run_command -Q command_worker.delete_sde_custom_plugin -n pas_command_worker@%h"
alias stopdock='docker stop $(docker ps -a -q)'
alias rmdock='docker rm $(docker ps -a -q)'
alias dc='docker-compose'
alias dcrb='docker-compose down -v --remove-orphans && docker-compose build --parallel'
alias pag='ps aux | rg'
alias htop="btm -b"
alias ls="ls --hyperlink=auto --color=auto"
alias l="exa"
alias ll="exa -la"
alias gjm="git jump merge"
alias gjd="git jump diff"
alias gjds="git jump diff --staged"
alias gjg="git jump grep"
alias python='python3'
alias pactivate='source $(poetry env info --path)/bin/activate'
alias open='xdg-open'
# wsl2 reclaim memory, see issue #4166 on microsoft/WSL repo
alias wsl_mem_fix="sudo sh -c \"echo 3 >'/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'\""
alias sudo='sudo '