Skip to content

Instantly share code, notes, and snippets.

@kowalcj0
Created July 12, 2018 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kowalcj0/d82ddbe0561855fe8c3646c77aef7391 to your computer and use it in GitHub Desktop.
Save kowalcj0/d82ddbe0561855fe8c3646c77aef7391 to your computer and use it in GitHub Desktop.
simple https://cheat.sh/ helper
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