Last active
October 1, 2025 01:26
-
-
Save ecoologic/768718fb3d0a4429d798070b95e9d612 to your computer and use it in GitHub Desktop.
.bash_aliases
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
| # echo ${(q)PS1} | |
| # %\(\?:%\{$'[01\;32m%\}%1\{➜%\}\ :%\{$'[01\;31m%\}%1\{➜%\}\ \)\ %\{$'[36m%\}%~%\{$'[00m%\}\ \$\(git_prompt_info\) | |
| # lsb_release -a # Ubuntu release or... | |
| # cat /etc/lsb-release | |
| # du -ah dir/ | sort -n -r | head -n 20 # biggest directories | |
| # find dir/ -type f -printf '%s %p\n' | sort -nr | head -10 # biggest directories | |
| # sudo vim /usr/bin/window-jumper.py # laptop:2560x1500 lenovo: 3840x2160 | |
| # https://stackoverflow.com/questions/7318497/omitting-the-first-line-from-any-linux-command-output | |
| # alias ssh='ssh -o StrictHostKeyChecking=no' | |
| # Read File System | |
| alias agw='ag --width=300' | |
| alias agQ='ag -Q' | |
| alias agc='ag "\<\<\<\<\<\<\< HEAD"' | |
| alias agdeb='ag binding\.pry app/ lib/ vendor/ config/ spec/ && ag debugger app/javascript/ app/assets/javascripts/' | |
| alias dfh='df -h | head' | |
| alias dusch='du -csh' # c total, s 'apparent size', h human | |
| alias egrep='egrep --color=auto' | |
| alias f='find . -iname ' | |
| alias grep='grep --color=auto' | |
| alias keep1='awk "{if(NR>1)print}"' # eg: tail x.csv |grep mine |keep1 | |
| alias myips='ifconfig |grep "inet.*255"' | |
| alias o='xdg-open' | |
| alias open='xdg-open' | |
| alias openports='lsof -n -i' | |
| alias tree='tree -I "node_modules|tmp|.*"' | |
| alias tailf='tail -f' | |
| alias llp='ls -lrt -d -1 $PWD/*' | |
| alias lo='ls -lrth' # or -halt # ordered by modified | |
| alias ls='ls --color=auto' | |
| alias ll='ls -lah' | |
| alias diff='diff --color' | |
| alias hist='history |tail -n 33' | |
| alias bigfiles="find . -type f -printf '%s %p\n' | sort -nr | head -30" | |
| alias cd_='cd $_' | |
| alias c_='code $_' | |
| alias v_='vim $_' | |
| # Write File System | |
| alias allmine='chown erik:erik -R .' | |
| alias sallmine='sudo chown erik:erik -R .' | |
| alias cpr='cp -r' | |
| alias mkdirp='mkdir -p' | |
| alias s='sudo' | |
| alias say='sudo apt -y' | |
| alias sup='sudo apt update -y && sudo apt upgrade -y && sudo apt autoclean -y && sudo apt autoremove -y' | |
| alias rmf='rm -rf' | |
| alias sideb='sudo dpkg -i' # sudo install deb | |
| replaceDir() { find ./ -type f -exec sed -i "s/$1/$2/g" {} \; ; }; | |
| touchp() { mkdir -p $(dirname $1) && touch $1; } | |
| # Git | |
| alias g='git' | |
| alias gl1='git log --pretty=format:"%h%x09%an%x09%ad%x09%s" --date=short' | |
| alias glc='git log --oneline |head -n 1' | |
| alias gmm='git fetch && git merge origin/main' | |
| alias gst='git status' | |
| alias gstash='git add . && git add . -u && git stash && git status' | |
| alias gpu='git push origin $(gbr) -u' | |
| # Docker | |
| alias d='docker' | |
| alias dc='docker-compose' | |
| alias dcub='docker-compose up --build' | |
| alias deit='docker exec -it' | |
| alias dls='docker image ls' | |
| alias dps='docker container ps' | |
| # Ruby | |
| alias b='bundle' | |
| alias be='bundle exec' | |
| alias rc='bin/rails c' | |
| alias rf='rspec --only-failures --format documentation' | |
| alias rs='bin/rails s -b 0.0.0.0' | |
| alias rspec='bin/spring rspec' | |
| alias sp='bin/spring' | |
| alias t='tailf log/development.log |grep "Started\|Render\|Process\|Param\|Completed\|AAAA"' | |
| # JS | |
| alias cy='node_modules/.bin/cypress' | |
| alias FAIL='node_modules/jest/bin/jest.js' | |
| alias y='yarn' | |
| alias yt='node_modules/jest/bin/jest.js' | |
| alias p='pnpm' | |
| # MongoDB | |
| alias start_mdb='sudo systemctl start mongod' | |
| alias enable_mdb='sudo systemctl enable mongod' | |
| alias status_mdb='sudo systemctl status mongod' | |
| # Misc | |
| alias v='vim' | |
| alias c='code' | |
| alias m8='microk8s' | |
| alias k='kubectl' | |
| alias cursor='~/.local/bin/Cursor --no-sandbox &' | |
| alias remo='(sh /usr/bin/reverse-mouse-scroll.sh || true); sh /usr/bin/disable-touchscreen.sh' | |
| alias cem='code ~/dev/em' | |
| alias cjob='code ~/Personal/jobs/2025' | |
| alias claude-code='~/claude-env/bin/claude-code' | |
| alias cc='~/claude-env/bin/claude-code' | |
| gpou() { | |
| git push -u origin "$(git symbolic-ref --short HEAD)" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment