Skip to content

Instantly share code, notes, and snippets.

View arumals's full-sized avatar

Arturo Maltos arumals

View GitHub Profile
@arumals
arumals / gist:1b40b79724e1025fb826105d0ade5623
Created May 16, 2024 21:17
Alias to print my geolocation from the command line
alias mylocation="curl -s 'http://ip-api.com/json/' | jq ."
@arumals
arumals / gist:6b389eca8d0f3d1748cfb1afff3d6198
Last active May 16, 2024 21:17
Alias to clean merged git branches from command line
clean_branches() {
git branch --merged | egrep -v "(^\*|master|main|dev)" | xargs git branch -d
}
@arumals
arumals / gist:4074dc26a028f9f16bbffdfc1787fabb
Last active May 16, 2024 21:14
Download a youtube video as mp3 directly from command line
# install yt-dlp from https://github.com/yt-dlp/yt-dlp
# add the following allias to your preferred shell configuration file
alias savemp3="yt-dlp -x --audio-format mp3 --audio-quality 0 --add-metadata --output \"%(uploader)s - %(title)s.%(ext)s\" https://www.youtube.com/watch\?v\="
# savemp3 videid