Skip to content

Instantly share code, notes, and snippets.

View joshp123's full-sized avatar

Josh Palmer joshp123

View GitHub Profile
@joshp123
joshp123 / redis-one-line--pattern-delete.sh
Last active July 5, 2017 13:45 — forked from MattSurabian/redis-one-line--pattern-delete.sh
One liner for deleting based on a pattern in redis. KEYS supports wildcards, delete/get/etc doesn't. No worries xargs to the rescue.
redis-cli -h <HOST> -p <PORT> KEYS "<PATTERN>" | xargs -i% redis-cli -h <HOST> -p <PORT> DEL %
#easy mmode:
redis-cli KEYS "<pattern>" | xargs -i% redis-cli GET %
@joshp123
joshp123 / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console