I hereby claim:
- I am tpitale on github.
- I am tpitale (https://keybase.io/tpitale) on keybase.
- I have a public key whose fingerprint is 6C17 F481 4889 B9AD 61EC 7719 A2EA 6E3E FD48 2FE3
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
command! ShouldToExpect %s/\(^\s\+\)\(.\+\)\.should \(.\+\)/\1expect(\2).to \3/ |
source "http://rubygems.org" | |
gem "railties", '4.0.3', require: %w(action_controller rails) | |
gem "grape" |
module Memoizable | |
def self.extended(mod) | |
mod.module_eval{ prepend(@memoizer = Module.new) } | |
end | |
def memoize(name) | |
@memoizer.module_eval do | |
define_method(name) do |*args, &block| | |
raise(ArgumentError, "cannot memoize method called with block") if block |
# | |
# PostgreSQL writes two optional commands to the database schema | |
# file, called db/structure.sql, that can only be run as a root | |
# database user. These are not needed actually, so comment them | |
# out automatically | |
# | |
# CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; | |
# COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; | |
# | |
namespace :db do |
module ActiveSupport::Concern | |
def append_features(base) | |
if base.instance_variable_defined?("@_dependencies") | |
base.instance_variable_get("@_dependencies") << { :module => self, :method => :include } | |
return false | |
else | |
return false if base < self | |
@_dependencies.each { |dep| base.send(dep[:method], dep[:module]) } | |
super | |
base.extend const_get("ClassMethods") if const_defined?("ClassMethods") |
git diff -p \ | |
| grep -E '^(diff|old mode|new mode)' \ | |
| sed -e 's/^old/NEW/;s/^new/old/;s/^NEW/new/' \ | |
| git apply |
require 'spec_helper' | |
# Bustle is a pubsub system used for activity streams: | |
# https://github.com/fredwu/bustle | |
# | |
# Here when a person follows another (or a discussion, for instance), the observer wires | |
# up pubsub between them for future activity notifications. The Follow model knows nothing | |
# about the implementation choices for the pubsub system. | |
describe FollowObserver do | |
subject { FollowObserver.instance } |
bva@bva-X51L:~/work/performance_tests/sinatra-test$ ab -n 1000 -c 10 -t 8 0.0.0.0:3000/tests | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 0.0.0.0 (be patient) | |
Finished 171 requests | |
Server Software: thin |
requirejs.config({ | |
shim: { | |
'foundation/jquery.foundation.topbar': { | |
deps: ['jquery'], | |
}, | |
'foundation/jquery.cookie': { | |
deps: ['jquery'] | |
}, | |
'foundation/jquery.event.move': { | |
deps: ['jquery'] |