Skip to content

Instantly share code, notes, and snippets.

@jeremyruppel
jeremyruppel / client.js
Created April 25, 2016 18:36
Testing an HTTP client: Part I
var request = require('superagent');
/**
* @constructor
*/
module.exports = Client;
function Client(api_key) {
this.params = {};
@jeremyruppel
jeremyruppel / client.js
Created April 25, 2016 18:43
Testing an HTTP client: Part II
var request = require('superagent');
/**
* @constructor
*/
module.exports = Client;
function Client(api_key) {
this.params = {};
@jeremyruppel
jeremyruppel / client.js
Created April 25, 2016 19:03
Testing an HTTP client: Part III
var request = require('superagent');
/**
* @constructor
*/
module.exports = Client;
function Client(api_key) {
this.params = {};
@jeremyruppel
jeremyruppel / asset_helper.rb
Created June 10, 2013 19:24
Inline asset helpers for middleman.
module AssetHelper
##
# Renders a stylesheet asset inline.
def inline_stylesheet( name )
content_tag :style do
sprockets[ "#{name}.css" ].to_s
end
end

Keybase proof

I hereby claim:

  • I am jeremyruppel on github.
  • I am ruppel (https://keybase.io/ruppel) on keybase.
  • I have a public key whose fingerprint is 6BC0 48A5 BA4D 361A 7F22 26D8 5E8C 0AAA 6F00 5E06

To claim this, I am signing this object:

@jeremyruppel
jeremyruppel / qrcode.sh
Created August 12, 2013 03:56
Printing a QR code from the command line.
#!/usr/bin/env bash
##
# The dimensions for the physical QR code, in pixels.
# The Brother QL-570 Label Printer tape is 2.44" wide
# at 72ppi, and 72 * 2.44 = 175.68, so 175 is good.
size=175x175
##
# Usage: qrcode [url]
@jeremyruppel
jeremyruppel / Run AppleScript.applescript
Last active December 20, 2015 22:49
Automator action to print a QR code for an Evernote note.
on run {input, parameters}
tell application "Evernote"
get the note link of the first item in (selection as list)
end tell
end run
describe MyClass do
example '#foo' do
verify { subject.foo }
end
end
@jeremyruppel
jeremyruppel / api_requests_spec.rb
Created June 11, 2013 20:46
Approval tests example: Legacy code
it 'should GET index' do
xhr :get, api_resource_path( version, resource.id ), :auth_token => user.authentication_token
verify :format => :json do
last_response.body
end
end
@jeremyruppel
jeremyruppel / tracking_hash.rb
Last active December 18, 2015 09:19
Approval tests example: Complex types
example '#tracking_hash' do
verify { users( :homer ).tracking_hash }
end