I hereby claim:
- I am lime on github.
- I am lime (https://keybase.io/lime) on keybase.
- I have a public key whose fingerprint is 15DD A4D7 03B7 B759 89B0 CD65 D91B 06E8 58F6 FD9A
To claim this, I am signing this object:
<!doctype html> | |
<html ng-app="sampleKinveyApp"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bootstrap, from Twitter</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<!-- Le styles --> |
before_filter do | |
resource = controller_path.singularize.gsub('/', '_').to_sym | |
method = "#{resource}_params" | |
params[resource] &&= send(method) if respond_to?(method, true) | |
end |
begin | |
require 'launchy' | |
class Mechanize::Page | |
def open_in_browser | |
if body | |
file = File.new("/tmp/#{Time.now.to_i}.html", 'w') | |
file.write body | |
Launchy.open "file://#{file.path}" | |
system "sleep 2 && rm #{file.path} &" |
class Player | |
constructor: (@node, @src) -> | |
@init() | |
init: -> | |
@node.src = @src | |
@node.play() | |
event: (type) -> | |
Bacon.fromEventTarget(@node, type).map ".currentTarget" |
from numpy import * | |
from scipy.stats import beta | |
class BetaBandit(object): | |
def __init__(self, num_options=2, prior=(1.0,1.0)): | |
self.trials = zeros(shape=(num_options,), dtype=int) | |
self.successes = zeros(shape=(num_options,), dtype=int) | |
self.num_options = num_options | |
self.prior = prior |
#!/usr/bin/env ruby | |
file_name = 'Gemfile' | |
text = File.read(file_name) | |
new_contents = text.gsub(/^\s*gem ['"]([\w_\-]+)['"]$/) do | |
original = Regexp.last_match[0] | |
gem_name = Regexp.last_match[1] | |
current_version = Gem.loaded_specs[gem_name].version.to_s | |
"#{original}, '>= #{current_version}'" | |
end |
I hereby claim:
To claim this, I am signing this object:
# Override default options for server command | |
# This example changes default development host to 127.0.0.1 | |
require 'rails/commands/server' | |
module Rails | |
class Server | |
new_defaults = Module.new do | |
def default_options | |
environment = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development' |
require 'spec_helper' | |
FactoryGirl.factories.each do |factory| | |
describe "The #{factory.name} factory" do | |
subject { build(factory.name) } | |
it { should be_valid } | |
factory.defined_traits.each do |trait| | |
describe "with trait #{trait.name}" do |