Skip to content

Instantly share code, notes, and snippets.

View dstrelau's full-sized avatar

Dean Strelau dstrelau

View GitHub Profile
@dstrelau
dstrelau / caveatPatchor.js
Created June 23, 2011 15:14 — forked from protocool/caveatPatchor.js
caveatPatchor.js file for use in Propane
var displayAvatars = true;
var displayCloudAppImages = true;
var displayGists = true;
if (displayAvatars) {
Object.extend(Campfire.Message.prototype, {
addAvatar: function() {
if (this.actsLikeTextMessage()) {
var author = this.authorElement();
source :rubygems
gem 'goliath', :git => 'git://github.com/postrank-labs/goliath.git'
Writing objects: 100% (1/1), 165 bytes, done.
Total 1 (delta 0), reused 0 (delta 0)
remote: Push worked, but post-receive failed: Connection reset by peer
remote: /data/github/current/vendor/gems/ruby/1.8/gems/redis-2.2.0/lib/redis/client.rb:234:in `ensure_connected'
remote: /data/github/current/vendor/gems/ruby/1.8/gems/redis-2.2.0/lib/redis/client.rb:114:in `process'
remote: /data/github/current/vendor/gems/ruby/1.8/gems/redis-2.2.0/lib/redis/client.rb:183:in `logging'
remote: /data/github/current/vendor/gems/ruby/1.8/gems/redis-2.2.0/lib/redis/client.rb:113:in `process'
remote: /data/github/current/vendor/gems/ruby/1.8/gems/redis-2.2.0/lib/redis/client.rb:38:in `call'
remote: /data/github/current/vendor/gems/ruby/1.8/gems/redis-2.2.0/lib/redis.rb:428:in `sadd'
remote: /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
@dstrelau
dstrelau / captcha.mkd
Created June 3, 2011 15:44
Hipster CAPTCHA

hipster captcha

Yah, it's quite an obscure word, you probably haven't heard of it

Yah, that captcha was cool, until everyone found out about it

I preferred that captcha's earlier work

All the cool captcha's have already gone on to triangle waves

This file has been truncated, but you can view the full file.
A
a
aa
aal
aalii
aam
Aani
aardvark
aardwolf
Aaron
@dstrelau
dstrelau / a.rb
Created May 10, 2011 18:04 — forked from rondevera/results.txt
#define_method vs ActiveSupport::StringInquirer
class A
attr_accessor :kind
def initialize(kind)
self.kind = kind
end
def one? ; self.kind == 'one' ; end
def two? ; self.kind == 'two' ; end
def three? ; self.kind == 'three' ; end
@dstrelau
dstrelau / beer.coffee
Created April 20, 2011 14:02
server.coffee
exports.alcohol = true
exports.go = ->
require module for module in findModules()
boot()
@dstrelau
dstrelau / app.rb
Created November 22, 2010 20:36
Gollum protected by HTTP Basic
require 'gollum/frontend/app'
require 'digest/sha1'
class App < Precious::App
User = Struct.new(:name, :email, :password_hash)
before { authenticate! }
helpers do
def authenticate!
source :rubygems
gem 'rack-test', :require => 'rack/test'
gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git'
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specifiy
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes