Skip to content

Instantly share code, notes, and snippets.

View jacobo's full-sized avatar

Jacob Burkhart jacobo

  • HOVER
  • San Francisco, CA
View GitHub Profile
@jacobo
jacobo / gist:2845265
Created May 31, 2012 18:29
Clever ideas from 2 years ago

Title:

Clever ideas from 2 years ago

Abstract:

In Late September, 2010, I left my job in Boston at 3M and moved across the country to work at Engine Yard in San Francisco.

I brought with me a collection of 40 open source repositories I had extracted from my work. I thought they would be invaluable, but I didn’t use a single one.

@jacobo
jacobo / gist:2847026
Created May 31, 2012 22:59
Testing: The Hard Parts

Title:

Testing: The Hard Parts

Abstract:

The thing about sour beer is, it’s all about off-flavors. There is a variation of flavors and funk that would be undesirable, if not for the label of sour.

A similar license is granted to the test author. The tolerance for crazy goes way up. And sometimes, the crazy part is also the genius part.

@jacobo
jacobo / gist:2847032
Created May 31, 2012 22:59
Being Present

Title:

Being Present

Abstract:

Do you ever get distracted by a persistent bug in production while hurtling towards the ground at 122 mph?

Find it easy to think about CSS while sweating through an intense vinyasa flow yoga class?

@jacobo
jacobo / gist:4068126
Created November 13, 2012 20:18
compliment generator in ruby
class Array
def rand
self[Kernel.rand(self.size)]
end
end
module Lisonja
class PartiallyStolenComplimentGenerator
VOWELS = ['a', 'e', 'i', 'o', 'u']
ADJ1 = ['elegant', 'hearty', 'beautiful', 'fine', 'fabulous', 'pretty',
@jacobo
jacobo / gist:4163419
Created November 28, 2012 19:18
Talks

Bio

Jacob is the world's foremost expert on (within the subset of people who: work in Ruby for a living, surf the Pacific regularly, and brew sour beers). He does all these things in San Francisco California, while working at Engine Yard.



title

Adambräu
Lindemans Framboise
Harpoon Raspberry UFO
Sam Adams Boston Lager (but only at Fenway Park)
Cuvée des Jacobins
Allagash White
Schneider Aventinus
Smithwick's
La Chouffe
Magic Hat Circus Boy
@jacobo
jacobo / hax_background_jobs_in_thin.ru
Created March 14, 2013 19:01
Example of running background jobs in thin without needing a separate background job processor (or spawning threads)
#Save this file as hax_background_jobs_in_thin.ru
#In one terminal run: thin start --rackup hax_background_jobs_in_thin.ru
#In another run: curl -v localhost:3000
class CleverMailSender
class << self; attr_accessor :emails_to_send; end
self.emails_to_send = []
def initialize(app)
@app = app
end
@jacobo
jacobo / hax_background_jobs_in_unicorn.ru
Created March 14, 2013 19:03
Example of running background jobs in unicorn without needing a separate background job processor (or spawning threads)
#Save this file as hax_background_jobs_in_unicorn.ru
#In one terminal run: unicorn hax_background_jobs_in_unicorn.ru
#In another run: curl -v localhost:8080
class CleverMailSender
class << self; attr_accessor :emails_to_send; end
self.emails_to_send = []
class BodyProxy
def initialize(body)
@body = body
@jacobo
jacobo / hax_background_jobs_with_threads.ru
Last active December 14, 2015 23:29
Example of running background jobs after request by spawning a thread
#Save this file as hax_background_jobs_with_threads.ru
#In one terminal run: rackup hax_background_jobs_with_threads.ru
#In another run: curl -v localhost:9292
class CleverMailSender
def self.send_email(email)
Thread.new do
puts "sending e-mail: #{email}"
5.times{|x| puts x; sleep 0.5}
puts "sent"
@jacobo
jacobo / hax_background_jobs_with_celluloid.ru
Last active December 14, 2015 23:29
Example of running background jobs after request by spawning a thread using Celluloid
#Save this file as hax_background_jobs_with_celluloid.ru
#In one terminal run: rackup hax_background_jobs_with_celluloid.ru
#In another run: curl -v localhost:9292
require 'celluloid'
class CleverMailSender
class Sender
include Celluloid
def send_email(email)