Last active
February 6, 2018 15:36
-
-
Save dpordomingo/e8534459401fc177a8457f856c4fc74f to your computer and use it in GitHub Desktop.
Aliases .bashrc
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
# Edit the .bashrc | |
alias bashedit='vi ~/.bashrc; bashreload; cd -' | |
alias bashreload='source ~/.bashrc' | |
# Converts a drawing image into a wireframe | |
alias convertImage='function _F { convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2;}; _F ' | |
# Clean apt cache, remps and remove dangling packages | |
alias aptClean='sudo apt-get autoclean; sudo apt-get purge; sudo apt-get autoremove; sudo apt-get clean; sudo apt autoclean; sudo apt autoremove; sudo apt clean; sudo apt purge;' | |
# Restart the networking... | |
alias netRestart='sudo /etc/init.d/network-manager restart; sudo /etc/init.d/networking restart;' | |
# Resizes the screen | |
alias screenResizeLaptop='xrandr --output eDP1 --scale 1x1 --mode 3200x1800 --fb 3200x1800 --pos 0x0' | |
alias screenResize='xrandr --output DP1 --scale 2x2 --mode 1920x1080 --fb 3840x3960 --pos 0x0 --output eDP1 --scale 1x1 --mode 3200x1800 --pos 320x2160' | |
alias screenResizeRecover='xrandr --output DP1 --scale 1x1 --mode 1920x1080 --fb 3200x2880 --pos 0x0 --output eDP1 --scale 1x1 --mode 3200x1800 --pos 0x1080' | |
# xdebug toggle | |
alias xdebugOn='sudo mv /etc/php/7.1/cli/conf.d/70-xdebug.ini.bak /etc/php/7.1/cli/conf.d/70-xdebug.ini; php -m | (grep xdebug && echo enabled) || echo disabled' | |
alias xdebugOff='sudo mv /etc/php/7.1/cli/conf.d/70-xdebug.ini /etc/php/7.1/cli/conf.d/70-xdebug.ini.bak; php -m | (grep xdebug || echo disabled)' | |
# python toggle | |
alias python2restore='sudo rm /usr/bin/python; sudo ln -s /usr/bin/python2 /usr/bin/python;' | |
alias python3restore='sudo rm /usr/bin/python; sudo ln -s /usr/bin/python3 /usr/bin/python;' | |
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
alias gitlog='git log --graph --abbrev-commit --decorate --all --format=format:"%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(dim white) - %an%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n %C(white)%s%C(reset)%n"' | |
alias gitstatus='git status --short --branch' | |
alias gitdiff='git diff' | |
alias gitcached='git diff --cached' | |
# ---- git src-d | |
alias issue='function _F { git remote update --prune; git co -B $1 sourced/master;}; _F ' | |
alias prFetch='function _F { git fetch sourced pull/$1/head:PR$1-$2; git co PR$1-$2;}; _F ' | |
# ---- git dpordomingo | |
alias rmBranch='function _F { git branch -D $1; git push david :$1;}; _F ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment