Skip to content

Instantly share code, notes, and snippets.

View hoffmanc's full-sized avatar

Chris Hoffman hoffmanc

View GitHub Profile
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'parallel_assets_compiler'
s.version = '0.2.0'
s.platform = Gem::Platform::RUBY
s.author = 'Jørgen Orehøj Erichsen'
s.email = '[email protected]'
s.summary = 'Compile assets in parallel'
s.description = 'Compile assets in parallel to speed up deployment'
@hoffmanc
hoffmanc / rtn.json
Created May 8, 2012 12:06
This represents the JSON.stringify-ed version of data fetched (via Mongoose) from the database.
[
{
"user_id": "105324781372784188083",
"email": "[email protected]",
"verified_email": true,
"name": "Carmine Moleti",
"given_name": "Carmine",
"family_name": "Moleti",
"link": "https://plus.google.com/105324781372784188083",
"picture": "https://lh6.googleusercontent.com/-IqhctvRS11k/AAAAAAAAAAI/AAAAAAAAATE/emxQvFOrhXk/photo.jpg",
@hoffmanc
hoffmanc / profiling_tool.rb
Created April 5, 2012 16:44 — forked from ksarna/profiling_tool.rb
Profiling rails requests with ruby-prof
# You can use this class in your console. For example
# p = ProfilingTools.new
# p.profiled_request(:controller => :welcome, :action => :index)
# this will profile whole application stack and save file in your tmp/profiler folder
# You can also use +request+ method just to see the output for example:
#
# p.request(:controller => :offers, :action => :index)
#
# p.response.body
# p.response.cookies # and so on
@hoffmanc
hoffmanc / promise.js
Created May 24, 2010 13:54 — forked from tmpvar/promise.js
Promise backport for node.js
var events = require('events');
exports.Promise = function () {
exports.EventEmitter.call(this);
this._blocking = false;
this.hasFired = false;
this._values = undefined;
};
process.inherits(exports.Promise, events.EventEmitter);