Skip to content

Instantly share code, notes, and snippets.

View adamjmcgrath's full-sized avatar

Adam Mcgrath adamjmcgrath

  • Auth0
  • London, UK
View GitHub Profile
@adamjmcgrath
adamjmcgrath / signature.js
Last active November 12, 2016 09:12
OAuth 1.0a signature generator using Ramda
const R = require('ramda')
const hmacsha1 = require('hmacsha1');
// Map arguments to OAuth keys.
const OAUTH_KEYS = {
consumerKey: 'oauth_consumer_key',
signatureMethod: 'oauth_signature_method',
oauthToken: 'oauth_token',
version: 'oauth_version',
nonce: 'oauth_nonce',
@adamjmcgrath
adamjmcgrath / didreceiveattrs.js
Created August 4, 2016 10:13
Ember: Observer vs didReceiveAttrs
didRecieveAttrs(attrs) {
if (attrs.newAttrs.dimensions.value !== attrs.oldAttrs.dimensions.value) {
chart.redraw();
}
}
import Ember from 'ember';
Ember.testing = true;
export default Ember.Component.extend({
attributeBindings: ['style'],
style: 'height: 100px; overflow: auto;',
content: Ember.computed(function() {
return 'foo';
}),
@adamjmcgrath
adamjmcgrath / get_release_changelog.py
Last active August 29, 2015 14:05
get_release_changelog.py
#!/usr/bin/env python
# Usage: get_release_changelog.py "Facebook v1.0"
import sys
import requests
USER = '' # Your email
SCRUMWISE_TOKEN = '' # Get from scrumwise settings
BASE_URL = 'https://api.scrumwise.com/service/api/v1/getData?includeProperties='