Skip to content

Instantly share code, notes, and snippets.

View glade-at-gigwell's full-sized avatar

Glade Luco glade-at-gigwell

  • Gigwell, Inc.
  • San Francisco, California
View GitHub Profile
@glade-at-gigwell
glade-at-gigwell / redis-migrate.sh
Created March 16, 2021 20:48 — forked from nicStuff/redis-migrate.sh
Comfort tool for migrating redis keys among instances. Supports KEYS syntax matching, authentication and TTL
#!/bin/bash
######
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
# TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
######
#!/bin/bash
# Author: Rick Cogley
# Updated: 27 Jan 2016
# Purpose: For use in a Mac OS X automator action, set to watch a screenshot folder.
# Assumes:
# GOPATH is set
# drive is installed (https://github.com/odeke-em/drive)
# there is a folder initialized with "drive init"
DRIVEINITPATH=$HOME/gdrive
### Keybase proof
I hereby claim:
* I am glade-at-gigwell on github.
* I am gladeatgigwell (https://keybase.io/gladeatgigwell) on keybase.
* I have a public key ASANFnvq0Kbl5MJy8dVO0P0vPg1Ehh53zQ1HClSgMn5WnAo
To claim this, I am signing this object:
@glade-at-gigwell
glade-at-gigwell / ChunkyCache.gs
Last active June 21, 2019 23:31 — forked from pilbot/ChunkyCache.gs
Using the Google Apps Script Cache Service for image blobs and objects above 100Kb
function ImageCache(cache) {
cache = ChunkyCache(cache || CacheService.getScriptCache());
return {
putBlob: function (key, value, timeout) {
cache.put(key, Utilities.base64Encode(value.getBytes()), timeout);
},
getBlob: function (key) {
var rawBytes = cache.get(key);
if (rawBytes) {