Skip to content

Instantly share code, notes, and snippets.

@noahlarsen
noahlarsen / a.rb
Last active August 29, 2015 14:01 — forked from ahoward/a.rb
# make this script run, update your gist with the running script, and it's
# output in a separate gist. the entire quzi should take 1-3 minutes, but you
# get 5.
#
#got nuthin...
# the meat - take < 5 minutes to do this
#
assert :hash do
@noahlarsen
noahlarsen / action.rb
Last active December 20, 2015 19:39 — forked from ahoward/action.rb
# it's not critical for understanding
# but here is the associated server-side action
#
def version
@program = load_program!
@version = @program.versions.find(params[:version_id])
if stale?(:last_modified => @version.updated_at, :etag => @version.cache_key)
render