Skip to content

Instantly share code, notes, and snippets.

@rickycodes
Created March 5, 2021 19:33
Show Gist options
  • Save rickycodes/af361218b680f1585c65dd1f600ecdc1 to your computer and use it in GitHub Desktop.
Save rickycodes/af361218b680f1585c65dd1f600ecdc1 to your computer and use it in GitHub Desktop.
alias ext='cd ~/projects/metamask-extension'
alias mobile='cd ~/projects/metamask-mobile'
# lock the screen
alias afk='xdg-screensaver lock'
alias away=afk
# copy paste lifted from OSX
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
alias away=afk
alias mm=ext
alias m=mobile
alias cat=bat
alias spoti=ncspot
alias grep=rg
# we collect all our global node modules in a special place
alias n='N_PREFIX=~/.global-modules/ n'
# this alias opens the project on github (if it exists there)
# uses https://www.npmjs.com/package/ghwd
alias gh='npx ghwd'
alias h='history'
alias co='git checkout'
alias commit='git commit -am '
alias studio='studio.sh'
alias say='espeak'
alias shrug=idk
alias dclean='docker rmi $(docker images -f "dangling=true" -q)'
# usage `countdown seconds` eg: `countdown 10` `countdown 60*15` etc.
# i found this on stack overflow
countdown() {
if [ -z "$1" ]
then
echo "usage: 'countdown [SECONDS]' please specify seconds"
else
_date=$((`date +%s` + $1));
while [ "$_date" -ge `date +%s` ]; do
echo -ne "$(date -u --date @$(($_date - `date +%s`)) +%H:%M:%S)\r";
sleep 0.1
done
fi
}
running() {
ps aux | grep $1 | grep -v "grep"
}
idk() {
local shrugs=("¯\_(ツ)_/¯" "¯\(°_°)/¯" "¯\(°_o)/¯" "┐(°_°)┌")
local shrug=${shrugs[$RANDOM % ${#shrugs[@]}]}
pbcopy <<< "${shrug}" && echo "${shrug} copied to clipboard"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment