Created
July 12, 2018 12:09
-
-
Save kowalcj0/d82ddbe0561855fe8c3646c77aef7391 to your computer and use it in GitHub Desktop.
simple https://cheat.sh/ helper
This file contains hidden or 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
function cheat() { | |
# ${1} - is the language/dmbs/etc | |
# ${*:2} - your query | |
# sed 's/ /+/g' - will replace spaces with `+` | |
curl https://cheat.sh/${1}/`echo "${*:2}" | sed 's/ /+/g'` | |
} | |
# example usage: | |
# cheat python recursion | |
# cheat python open files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment