Skip to content

Instantly share code, notes, and snippets.

View ginjo's full-sized avatar

William Richardson ginjo

View GitHub Profile
@ginjo
ginjo / scheduled_job.rb
Created September 10, 2012 05:06 — forked from kares/scheduled_job.rb
Recurring Job using Delayed::Job
# # # # # scheduled_job.rb - recurring schedules for delayed_job.rb # # # # #
#
# This file is version controlled at https://gist.github.com/ginjo/3688965
#
# Forked from https://gist.github.com/kares/1024726
#
# This is an enhanced version of the original scheduled_job.rb
# It was born out of the need to schedule a whole bunch of simple jobs.
# I started with the sample below and quickly found that I was repeating
# a lot of code. So I created the Delayed::Task pseudo-class that allows
@ginjo
ginjo / gist:aaa4a4395fcdbbad3d29
Last active December 1, 2019 08:32 — forked from bkimble/gist:1365005
Get structured array of hashes of memcached keys on multiple servers
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Forked from bkimble's gist https://gist.github.com/bkimble/1365005
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
# Currently resides at https://gist.github.com/ginjo/aaa4a4395fcdbbad3d29
#
# This fork separates the server query code from results presentation.
# The primary function of this script is to return an array of hashes of
# key items from any number of provided memcached servers.