Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeremy Ruppel jeremyruppel

View GitHub Profile
View keybase.md

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 / c9ac361ac4b8096146c8ce10d3037b92.js
Last active January 12, 2023 14:14
Testing an HTTP client: Part IV
View c9ac361ac4b8096146c8ce10d3037b92.js
var path = require("path");
/**
* GET /services/rest?api_key=9147f8d3b61c82089641b1268482c2a1&format=json&nojsoncallback=1&method=flickr.photos.search&text=coffee
*
* host: api.flickr.com
* accept-encoding: gzip, deflate
* user-agent: node-superagent/1.8.3
* connection: close
*/
@jeremyruppel
jeremyruppel / client.js
Created April 25, 2016 19:03
Testing an HTTP client: Part III
View client.js
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
View client.js
var request = require('superagent');
/**
* @constructor
*/
module.exports = Client;
function Client(api_key) {
this.params = {};
@jeremyruppel
jeremyruppel / client.js
Created April 25, 2016 18:36
Testing an HTTP client: Part I
View client.js
var request = require('superagent');
/**
* @constructor
*/
module.exports = Client;
function Client(api_key) {
this.params = {};
@jeremyruppel
jeremyruppel / Run AppleScript.applescript
Last active December 20, 2015 22:49
Automator action to print a QR code for an Evernote note.
View Run AppleScript.applescript
on run {input, parameters}
tell application "Evernote"
get the note link of the first item in (selection as list)
end tell
end run
@jeremyruppel
jeremyruppel / qrcode.sh
Created August 12, 2013 03:56
Printing a QR code from the command line.
View qrcode.sh
#!/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]
View my_class_spec.rb
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
View api_requests_spec.rb
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
View tracking_hash.rb
example '#tracking_hash' do
verify { users( :homer ).tracking_hash }
end