Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html lang=“en”>
<head>
<meta charset="utf-8">
<title>About | Janet Ferguson Full Stack Web Developer</title>
<!--[if lt IE 9]>
<script src="dist/html5shiv.js"></script>
<![endif]-->
</head>
<body>
@collin
collin / redis_json_marshal_eval_benchmarks.rb
Created January 27, 2012 23:23 — forked from shilov/redis_json_marshal_eval_benchmarks.rb
Ruby Redis benchmarks for JSON vs Marshal vs String
# http://forrst.com/posts/JSON_vs_Marshal_vs_eval_Which_is_the_fastest_fo-6Qy
require 'benchmark'
require 'json'
require 'redis'
# -----------------
puts "Initialize variables.."
@collin
collin / morse_code.rb
Created January 27, 2012 14:54 — forked from astroud/morse_code.rb
More first grade fun learning Ruby
# Inspired by https://gist.github.com/1172097
alphabet = Hash[
:a => "dit dah",
:b => "dah dit dit dit",
:c => "dah dit dah dit",
:d => "dah dit dit",
:e => "dit",
:f => "dit dit dah dit",
:g => "dah dah dit",
class Object
def collapse
memcache.store :key => object_id, :value => ENV["HOST_NAME"]
end
def persist
database.insert object_id, Marshall.dump(self)
end
end
@collin
collin / gist:3363
Created July 31, 2008 00:24 — forked from nex3/gist:3262
$.password
:blur
if @value === ""
.hide()
// Eventually, indenting beneath something will set it as the context
.prev()
.show().val(@default_value)
.blur()