Last active
September 29, 2022 00:39
-
-
Save rubeniskov/492531bf3cfa162e9a3b21ffb0db6ca4 to your computer and use it in GitHub Desktop.
This file contains 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
exec_remote() { wget -q -O- "$1" | bash -s "${@:2}"; } | |
cache_remote() { bn=`[ -n "$2" ] && echo "$2" || basename "$1"`; td=`echo /tmp/test`; mkdir -p $td; fn=$td/$bn; [ -f $fn ] || wget -q -O- "$1" > $fn; chmod +x $fn; echo $fn;} | |
import_remote() { cn=`cache_remote "$@"`; bn=`basename $cn`; fn="${bn%.*}"; eval "$fn() { bash -e $cn "\$@"; }"; } | |
alias resolve-gist-url='exec_remote https://bit.ly/2JGtC2R' | |
alias import='import_remote' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment