- Saute a few cloves of garlic and a large onion in olive oil
- Add a teaspoon of each:
- Paprika
- Cumin
- Cayenne pepper
- a pinch of cinnamon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show helpful info on why we redirected in logs | |
def redirect_to(options = {}, response_status = {}) | |
::Rails.logger.error("Redirected by #{caller(1).first rescue "unknown"}") | |
super(options, response_status) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ > mkdir foo | |
~ > cd foo | |
~/foo > git init | |
Initialized empty Git repository in /Users/jack/foo/.git/ | |
~/foo master > touch .this_shows | |
~/foo master > gst | |
# On branch master | |
# | |
# Initial commit | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 if typeof component.setup == 'function' | |
94 component.setup() | |
95 else | |
96 foo component.setup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 describe Comment do | |
4 it "fires an event when created" do | |
5 expect { Comment.make! }.to fire_event :comment_left | |
6 end | |
7 end | |
... | |
38 RSpec::Matchers.define :fire_event do |event_type| | |
39 match do |actual| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* this file exists in app/assets/stylesheets | |
*= require "style" | |
*= require token-input | |
*/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:javascript | |
yepnope({ | |
test: Modernizr.input.placeholder, | |
nope: '/javascripts/h5f.min.js', | |
callback: function(url, result, key) { | |
H5F.setup(document.getElementById("new_comment")); | |
} | |
}); | |
= simple_form_for Comment.new(:commentable => @obj) do |f| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git/pow master > npm install --dev | |
npm info it worked if it ends with ok | |
npm info using [email protected] | |
npm info using [email protected] | |
npm info calculating sha1 /usr/local/lib/node/.npm/.cache/pow/0.2.2/package.tgz | |
npm info shasum ec39aba796d89362ffa0e67980b3eefd30600b4c | |
npm info range log@>= 1.1.1 | |
npm info preinstall [email protected] | |
npm info preinstall [email protected] | |
npm info preinstall [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks Xavier, I too am a big fan of the style. It’s an honest capturing of what it’s like to learn this sort of thing for the first time (or in my case with fibers, the 10th). | |
Everything was clear up til the end, which is where the details get fuzzy for me. | |
If I could add in my $.02 to this final chunk: | |
class Surprise < Goliath::API | |
def response(env) | |
f = Fiber.current | |
EventMachine.add_timer 1, proc { f.resume } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2) Error: | |
test_rails_root_templates(GeneratorsTest): | |
NoMethodError: undefined method `parents' for #<TestApp::Application:0x00000100b1ae58> | |
/Users/jack/git/rails/railties/lib/rails/railtie/configurable.rb:28:in `method_missing' | |
/Users/jack/git/rails/railties/lib/rails/generators/named_base.rb:62:in `namespace' | |
/Users/jack/git/rails/railties/lib/rails/generators/named_base.rb:67:in `namespaced?' | |
/Users/jack/git/rails/railties/lib/rails/generators/named_base.rb:75:in `class_path' | |
/Users/jack/git/rails/railties/lib/rails/generators/named_base.rb:90:in `class_name' | |
/Users/jack/git/rails/railties/lib/rails/generators/named_base.rb:178:in `block in check_class_collision' | |
/Users/jack/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/task.rb:22:in `run' |