I hereby claim:
- I am oestrich on github.
- I am ericoestrich (https://keybase.io/ericoestrich) on keybase.
- I have a public key ASDfZSNUBY96XScRjsdNmXpz6nHJ0y1XhfVA6MnxOGUG2Qo
To claim this, I am signing this object:
require 'faraday' | |
require 'json' | |
def hash_password_for_private_key(password, sha_klass = OpenSSL::Digest::SHA256) | |
sha256 = sha_klass.new | |
1000.times.inject(password) do |hash, _| | |
sha256.hexdigest(hash) | |
end | |
end |
require 'openssl' | |
require 'benchmark' | |
data = "Hello, world!" | |
Benchmark.bm do |x| | |
x.report do | |
private_key = OpenSSL::PKey::RSA.new 4096 | |
public_key = private_key.public_key |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Backbone game of life</title> | |
<meta charset='utf-8' /> | |
<script type='text/javascript' src='jquery.js'> </script> | |
<script type='text/javascript' src='underscore.js'> </script> | |
<script type='text/javascript' src='backbone.js'> </script> | |
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" > | |
<ImageView | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:src="@drawable/red" | |
android:adjustViewBounds="true"/> |
resource "Order" do | |
let(:client) { RspecApiDocumentation::TestClient.new(self, :headers => { "HTTP_ACCEPT" => "application/json", "CONTENT_TYPE" => "application/json" }) } | |
post "/orders" do | |
parameter :name, "Order name" | |
let(:name) { "New order" } | |
let(:raw_post) { params.to_json } |
source :rubygems | |
gem 'webmachine' | |
gem 'rspec' | |
gem 'rspec_api_documentation' | |
gem 'rack-test' | |
gem 'json_spec' |
Feature: Use OAuth2 MAC client as a test client | |
Background: # features/oauth2_mac_client.feature:2 | |
Given a file named "app_spec.rb" with: # aruba-0.4.11/lib/aruba/cucumber.rb:15 | |
""" | |
require "rspec_api_documentation" | |
require "rspec_api_documentation/dsl" | |
require "rack/builder" | |
RspecApiDocumentation.configure do |config| |
ActiveSupport::Notifications.subscribe(/my_class$/) do |*args| | |
event = ActiveSupport::Notifications::Event.new(*args) | |
Rails.logger.warn "%7.2fms %s" % [event.duration, event.name] | |
end |
class ParallelTestAdapter < Faraday::Adapter::Test | |
self.supports_parallel = true | |
def self.setup_parallel_manager | |
OpenStruct.new | |
end | |
end |
I hereby claim:
To claim this, I am signing this object: