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
| sweet_hash = { | |
| foo: "bar", | |
| faz: "baz" | |
| } |
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
| Day job: Web/Mobile Developer @ GoTime | |
| Your Rails contributions: Gems https://rubygems.org/profiles/2519 | |
| What's your Ruby/Rail experience?: 4 years, working almost always with Rails. | |
| How do you use GitHub?: Private hosting for work and public hosting for open source |
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 'uri' | |
| require 'net/http' | |
| require 'net/https' | |
| module Curl | |
| class Easy | |
| attr_accessor :uri, :headers, :follow_location, :max_redirects | |
| attr_accessor :response, :redirect_count | |
| def initialize |
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
| if ARGV.size != 2 | |
| puts "usage: cassandra_tokens.py <current_size> <new_size>" | |
| exit | |
| end | |
| CURRENT_NODES = ARGV[0].to_i | |
| GOING_TO_NODES = ARGV[1].to_i | |
| RING_SIZE = 2**127 | |
| def tokens(node_count) |
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
| function SearchPlaces(inputSelector) { | |
| var input = $(inputSelector).hintInput(), | |
| baseUrl = input.attr('data-source'); | |
| function currentQuery() { | |
| if (input.hasClass('empty')) { | |
| return ''; | |
| } else { | |
| return input.val(); | |
| } |
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
| Braintree::Configuration.tap do |config| | |
| if settings = YAML.load_file(Rails.root.join('config', 'braintree.yml'))[Rails.env] | |
| config.environment = :sandbox | |
| config.merchant_id = settings['merchant_id'] | |
| config.public_key = settings['public_key'] | |
| config.private_key = settings['private_key'] | |
| 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
| source "http://rubygems.org" | |
| gem 'mcmire-cassandra', require: 'cassandra/1.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
| @@test_classes = {} | |
| @@test_methods = {} | |
| setup do | |
| @start_time = Time.now | |
| end | |
| teardown do | |
| delta = Time.now - @start_time |
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
| p "Hello world" |
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
| { | |
| "_scroll_id"=>"c2NhbjsxOzc4NjprWFFSS01qU1JOYXVmZ3MxN0dYQVVROzE7dG90YWxfaGl0czozOw==", | |
| "took"=>2, | |
| "timed_out"=>false, | |
| "_shards"=>{ | |
| "total"=>5, | |
| "successful"=>2, | |
| "failed"=>3, | |
| "failures"=>[ | |
| {"status"=>500, "reason"=>"SearchContextMissingException[No search context found for id [784]]"}, {"status"=>500, "reason"=>"SearchContextMissingException[No search context found for id [787]]"}, |