myFunc = function() {
{"name": {"first": "blah"}}
}
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
| [GEM_ROOT]/gems/mongo-1.3.1/lib/mongo/util/pool.rb:80:in `rescue in checkout_new_socket' | |
| [GEM_ROOT]/gems/mongo-1.3.1/lib/mongo/util/pool.rb:76:in `checkout_new_socket' | |
| [GEM_ROOT]/gems/mongo-1.3.1/lib/mongo/util/pool.rb:156:in `block (2 levels) in checkout' | |
| : | |
| [GEM_ROOT]/gems/mongo-1.3.1/lib/mongo/util/pool.rb:152:in `block in checkout' | |
| [GEM_ROOT]/gems/mongo-1.3.1/lib/mongo/util/pool.rb:145:in `loop' | |
| [GEM_ROOT]/gems/mongo-1.3.1/lib/mongo/util/pool.rb:145:in `checkout' | |
| [GEM_ROOT]/gems/mongo-1.3.1/lib/mongo/repl_set_connection.rb:324:in `checkout_writer' | |
| [GEM_ROOT]/gems/mongo-1.3.1/lib/mongo/connection.rb:477:in `receive_message' | |
| [GEM_ROOT]/gems/mongo-1.3.1/lib/mongo/cursor.rb:407:in `block in send_initial_query' |
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
| // NOTE: You need dotjs installed to use this: https://github.com/defunkt/dotjs | |
| // | |
| // You must name this file with your airbrakeapp subdomain prepended to the filename. | |
| // Example: So myairbrakesubdomain.airbrakeapp.com.js | |
| var login = "<GITHUB USERNAME>"; | |
| var token = "<GITHUB TOKEN>"; | |
| var title = $("#notice_heading h2").text(); | |
| var link = document.location.href; |
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
| def compile_template_method(locals) | |
| source, offset = precompiled(locals) | |
| offset += 5 | |
| method_name = "__tilt_#{Thread.current.object_id.abs}" | |
| Object.class_eval <<-RUBY, eval_file, line - offset | |
| #{extract_magic_comment source} | |
| TOPOBJECT.class_eval do | |
| def #{method_name}(locals) | |
| Thread.current[:tilt_vars] = [self, locals] | |
| class << self |
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
| require 'rubygems' | |
| require 'json/pure' | |
| require 'awesome_print' | |
| class Person | |
| attr_accessor :name, :age | |
| def initialize(name, age) | |
| @name, @age = name, age | |
| 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
| attributes :_id, :as => :id | |
| attributes :name, :blah, :foo, :bar | |
| offers do | |
| attributes :foo, :bar | |
| messages do | |
| # ... | |
| end | |
| 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
| { | |
| "aps": {"alert": "some message"}, | |
| "aliases": ["1234"], | |
| "key1": "val1", | |
| "key2": "val2" | |
| } |
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
| # shelling out to the system here is what triggers signal trap bug. | |
| # If we remove this line, all works as intended. | |
| # | |
| # This issue affects ruby 1.9.2-p180 and ubuntu 11.04, kernel version 2.6.38-8-virtual | |
| # References: https://bugzilla.kernel.org/show_bug.cgi?id=32922 | |
| `echo blah` | |
| loop do | |
| trap("INT") { puts("exiting..."); exit(0) } |
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
| def mobile | |
| respond_to do |fmt| | |
| fmt.iphone { ... } | |
| fmt.andriod { ... } | |
| end | |
| 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
| module Sinatra | |
| module AmbiguousRoutes | |
| def self.registered(app) | |
| app.class_eval do | |
| class << self | |
| private | |
| def route_with_ambiguity(verb, path, options = {}, &block) |