Skip to content

Instantly share code, notes, and snippets.

View danklynn's full-sized avatar

Dan Lynn danklynn

View GitHub Profile

Keybase proof

I hereby claim:

  • I am danklynn on github.
  • I am danklynn (https://keybase.io/danklynn) on keybase.
  • I have a public key ASAvTGNDjpU49yz4ZlnxeRr45_-_p8_xR1J2wpLX7Ap2Zwo

To claim this, I am signing this object:

{
"data" : [ {
"extendedTypes" : [ {
"value" : "FullContact/4.0-beta6.1 (4023) OS/iPhone OS 7.1 Device/iPhone",
"type" : "X-Device-User-Agent"
}, {
"value" : "21B02FEF-9858-4E38-ABC6-E3543BB6505E",
"type" : "X-Device-Id"
} ],
"tags" : [ ],
@danklynn
danklynn / CurrentUsers.js
Last active August 29, 2015 13:57
Tracking "signed-in" users with a CurrentUsers model
module.exports = {
attributes: {
username: 'STRING',
password: 'STRING',
photoUrl: 'STRING',
twitterUsername: 'STRING'
}
};
@danklynn
danklynn / gist:5246620
Last active December 15, 2015 10:38
Example use of FullContact's API rate limiting HTTP status headers
$ curl -v "https://api.fullcontact.com/v2/person.json?email=dan@fullcontact.com&apiKey=XXXXXXXX"
< HTTP/1.1 200 OK
< Server: nginx/1.2.1
< Date: Tue, 26 Mar 2013 15:58:14 GMT
< Content-Type: application/json;charset=UTF-8
< Content-Length: 5857
< Connection: keep-alive
< Vary: Accept-Encoding
< X-Rate-Limit-Limit: 600
< X-Rate-Limit-Remaining: 598
Given /^I (?:send and )?accept (.*?)(?: responses)?$/ do |format|
@format = format.downcase.to_sym
header('Content-Type', content_type_for(@format))
http_accept(@format)
end
Given /^the requester accepts (.*) responses$/ do |format|
Given "I accept #{format} responses"
end