Skip to content

Instantly share code, notes, and snippets.

@NightMachinary
NightMachinary / get_latest_release.zsh
Last active Apr 17, 2021 — forked from lukechilds/get_latest_release.sh
Shell - Get latest release from GitHub
View get_latest_release.zsh
## See latest version at https://github.com/NightMachinary/.shells/blob/master/scripts/zshlang/auto-load/others/github.zsh
## Usage:
# $ gh-release-get "creationix/nvm"
##
alias ec='print -r --'
function gh-release-get() {
local repo="$1"
local releases
releases="$(curl -s https://api.github.com/repos/"$repo"/releases)"
@NightMachinary
NightMachinary / areplace.sh
Last active Dec 2, 2021 — forked from hlissner/replace.sh
Bulk search & replace with ag (the_silver_searcher)
View areplace.sh
# ag <https://github.com/ggreer/the_silver_searcher>
# from=str1 to=sth agr path1 path2 ...
# backs up to .pbak
comment() {
}
doc() {
}
function agr {
doc 'usage: from=sth to=another agr [ag-args]'