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 / 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='
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 / 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();
}
}
@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',
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@adamjmcgrath
adamjmcgrath / controllers.application.js
Last active August 12, 2017 00:19
Ember partial memory leak
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
show: true,
version: Ember.VERSION,
actions: {
toggle() {
this.toggleProperty('show');
this.set('glimmerEnvStrings', Ember.getOwner(this).lookup('service:-glimmer-environment').constants.strings.length);
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
foo: {
bar: 0
},
init() {
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@adamjmcgrath
adamjmcgrath / README.md
Last active April 24, 2020 15:11
rollup plugin bug

run npm start

...
ReferenceError: Blob is not defined
...
@adamjmcgrath
adamjmcgrath / README.md
Created May 2, 2020 07:03
rollup plugin warning

run npm start

$ rollup -c && webpack rolled-up.js

> [email protected] start /dev/tmp-rollup-webpack
> rollup -c && webpack rolled-up.js


index.js → rolled-up.js...