Skip to content

Instantly share code, notes, and snippets.


Christopher redinger

View GitHub Profile

Keybase proof

I hereby claim:

  • I am redinger on github.
  • I am redinger ( on keybase.
  • I have a public key whose fingerprint is 52A9 21CD DE17 90B7 450C C155 C17B 31DE DC63 A669

To claim this, I am signing this object:

View gist:4698
class Rock
def play(previous="s")
def name
View gist:6671
# Video:
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
View autoconf.rb
module Autoconf
extend self
def switches(config=nil)
case config
when String
when Enumerable {|item| switch(item) }.join(" ").strip
View god.rb
rails_root = "/data/github/current"
20.times do |num| do |w| = "dj-#{num}" = 'dj'
w.interval = 30.seconds
w.start = "rake -f #{rails_root}/Rakefile production jobs:work"
w.uid = 'git'
View rack-noslashdot.rb
class NoSlashdot
def initialize(app, options = {})
@app = app
@options = options
@options[:redirect] ||= ''
def call(env)
slashdot_sent_ya?(env) ? kick_it :
View generate_rails_app.rb
#!/usr/bin/env ruby
# Written by Kieran P
# Feel free to fork and modify.
# If you do, send me a message on
# Github details changes and I'll
View gist:540518
ruby 1.8.7
>> [1, 88, 132, 78, 74].pack("C5")
=> "\001X\204NJ"
ruby 1.9.2
>> [1, 88, 132, 78, 74].pack("C5")
=> "\x01X\x84NJ"
redinger / Datomic News Updates
Created Jul 22, 2012 — forked from stuarthalloway/Datomic News Updates
Datomic update examples against a social news database
View Datomic News Updates
;; Datomic example code
;; demonstrates various update scenarios, using a news database
;; that contains stories, users, and upvotes
;; grab an in memory database
(use '[datomic.api :only (q db) :as d])
(def uri "datomic:mem://foo")
(d/create-database uri)
(def conn (d/connect uri))