Skip to content

Instantly share code, notes, and snippets.

View davidcelis's full-sized avatar
Verified account

David Celis davidcelis

Verified account
View GitHub Profile
@davidcelis
davidcelis / 1.9.3-p362-perf.md
Last active October 17, 2016 11:28 — forked from burke/0-readme.md
Ruby 1.9.3-p362 cumulative performance patch for rbenv

NOTE: THIS PATCH DOES NOT APPLY. Falcon's performance patches have not been updated for p362. See the comments for a fork that uses the Rails Express patch set instead.

ruby-1.9.3-p362 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p362 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

@davidcelis
davidcelis / README.md
Last active April 18, 2016 23:14
I have a jpg in me

I have a JPG

$ ghi -vv show 273 -- stephencelis/ghi
===> GET /repos/stephencelis/ghi/issues/273
<=== 200: {
"url": "https://api.github.com/repos/stephencelis/ghi/issues/273",
"repository_url": "https://api.github.com/repos/stephencelis/ghi",
"labels_url": "https://api.github.com/repos/stephencelis/ghi/issues/273/labels{/name}",
"comments_url": "https://api.github.com/repos/stephencelis/ghi/issues/273/comments",
"events_url": "https://api.github.com/repos/stephencelis/ghi/issues/273/events",
"html_url": "https://github.com/stephencelis/ghi/issues/273",
"id": 129930467,
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 6db36f608fcb534a119ea229b33a95daae61ee6f
Last commit: 20 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: 8-core 64-bit haswell
OS X: 10.11.2-x86_64
@davidcelis
davidcelis / sluggable.rb
Last active December 23, 2015 02:39
an concern
module Sluggable
extend ActiveSupport::Concern
included do
before_create :set_slug
validates :slug, uniqueness: { case_sensitive: false }
scope :from_param, -> param { find_by(slug: param) }
end
@davidcelis
davidcelis / instance.rb
Last active December 22, 2015 23:19
Update every instance of a Ruby class
class Worker
class << self
attr_accessor :instances
def update_instances
instances.each do |instance|
# Update accordingly
end
end
end
# A sample Gemfile
source "https://rubygems.org"
gem 'crepe', github: 'stephencelis/crepe'
gem 'puma'
gem 'rake'
gem 'app'
gem 'activerecord', require: 'active_record'
gem 'actionmailer', require: 'action_mailer'
@davidcelis
davidcelis / roobie.rb
Last active December 19, 2015 19:08
Cool story, Enumerator
2.0.0-p247> (1..10).to_enum
# => #<Enumerator: 1..10:each>
2.0.0-p247> (1..10).to_enum.size
# => nil
2.0.0-p247> (1..10).each
# => #<Enumerator: 1..10:each>
2.0.0-p247> (1..10).each.size
# => 10
.wizard
- if section == 'new_building'
%a.current
%span.badge.badge-inverse 1
New Building
- else
%a
%span.badge 1
New Building
%a

It's with a heavy heart that I announce that Friday, May 31 2013 will be my last day at Heroku.

How can I possibly put into words what Heroku has meant to me these last six years? I can say it was a tremendous experience; or the opportunity of a lifetime; or the greatest thing I have ever been a part of. I can say that Heroku has been my life's work, as I did recently in a public blog post. All of those things are true, but none seem to capture the enormity of what's transpired these past six years.

I tend to focus on mechanical elements of a company: product, code, design, process. But what has surprised me the most at Heroku is that none of these things is the best part. The best part is the team.

I've never had the chance to work with a more singular group of people. Talented, passionate, skilled, dedicated. Most of all, sharing a set of values: elegance, craft, maniacal focus on simplicity; and an uncompromising belief that the future will be made of software, and how that software gets made will shape