Skip to content

Instantly share code, notes, and snippets.

@djismgaming
Last active June 18, 2020 12:36
Show Gist options
  • Select an option

  • Save djismgaming/50857c16bfa3805348f7e6e4b92b3784 to your computer and use it in GitHub Desktop.

Select an option

Save djismgaming/50857c16bfa3805348f7e6e4b92b3784 to your computer and use it in GitHub Desktop.
# Put this one in your home folder
# This next one makes edit of aliases faster by opening directly in nano and then applying the changes just after edit
alias aliasc='nano ~/.bash_aliases && source ~/.bash_aliases'
# manage docker containers
alias dcd='docker-compose down'
# alias dcu='docker-compose up -d'
alias dcu='docker-compose up -d --remove-orphans'
alias dcp='docker-compose pull'
alias dcs='docker-compose stop'
alias dcstart='docker-compose up $1 -d'
alias dcstop='docker-compose stop $1'
alias dcr='docker restart $1'
alias dcl='docker-compose logs -f'
alias de='docker exec -it "$1" bash'
.
# move up one directory faster
alias cdd='cd ..'
# download the mp3 audio from a web video
alias ya='youtube-dl -x --audio-format mp3 $1'
# import a music file to beet library
alias bi='beet import $1'
# clear screen
alias c='clear'
# move to a specific directory
alias storage='cd /Volumes/storage'
# start jdownloader2 directly
alias jd2='java -jar /srv/dev-disk-by-label-storage/home/ismael/jd2/JDownloader.jar'
# mpp commands to configure inverter MPPSolar LV5048 from ubuntu/server using https://github.com/jblance/mpp-solar
alias mppcharge10='mpp-solar -d /dev/hidraw0 -M LV5048 -c MUCHGC010'
alias mppcharge20='mpp-solar -d /dev/hidraw0 -M LV5048 -c MUCHGC020'
alias mppcharge30='mpp-solar -d /dev/hidraw0 -M LV5048 -c MUCHGC030'
alias mppcharge40='mpp-solar -d /dev/hidraw0 -M LV5048 -c MUCHGC040'
alias mppsol='mpp-solar -d /dev/hidraw0 -M LV5048 -c POP01'
alias mpputil='mpp-solar -d /dev/hidraw0 -M LV5048 -c POP00'
alias mppsbu='mpp-solar -d /dev/hidraw0 -M LV5048 -c POP02'
alias mppflag='mpp-solar -d /dev/hidraw0 -M LV5048 -c QFLAG'
alias mppstat='mpp-solar -d /dev/hidraw0 -M LV5048 -c QPIGS && mpp-solar -d /dev/hidraw0 -M LV5048 -c QPIGS2'
alias mppsett='mpp-solar -d /dev/hidraw0 -M LV5048 -c QPIRI'
alias mppcommand='mpp-solar -d /dev/hidraw0 -M LV5048 -c'
alias mppchargeutil='mpp-solar -d /dev/hidraw0 -M LV5048 -c PCP00'
alias mppchargesolfirst='mpp-solar -d /dev/hidraw0 -M LV5048 -c PCP01'
alias mppchargesolutil='mpp-solar -d /dev/hidraw0 -M LV5048 -c PCP02'
alias mppchargesolonly='mpp-solar -d /dev/hidraw0 -M LV5048 -c PCP03'
alias mppappliance='mpp-solar -d /dev/hidraw0 -M LV5048 -c PGR00'
alias mppups='mpp-solar -d /dev/hidraw0 -M LV5048 -c PGR01'
alias mppservicestatus='systemctl --user status mpp-solar'
alias mppweb='echo https://github.com/jblance/mpp-solar'
# know how much battery is left on server
alias battery='upower -i /org/freedesktop/UPower/devices/battery_BAT0'
# update system
alias update='sudo apt update && sudo apt upgrade'
# reboot system
alias update='sudo reboot'
@djismgaming
Copy link
Author

djismgaming commented Jun 18, 2020

Just adding the commands I use the most in a Linux/macOS machine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment