Skip to content

Instantly share code, notes, and snippets.

View paddyobrien's full-sized avatar

Patrick O'Brien paddyobrien

View GitHub Profile
@paddyobrien
paddyobrien / gist:2953015
Created June 19, 2012 08:28
Sublime debug
[{
"keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.js", "match_all": true }
]
},
@paddyobrien
paddyobrien / orientation.js
Last active November 6, 2015 00:54
A simplified JPEG orientation checker
/* Based off https://github.com/mattiasw/ExifReader */
(function() {
(typeof exports !== "undefined" && exports !== null ? exports : this).ExifReader = (function() {
ExifReader.prototype._MIN_DATA_BUFFER_LENGTH = 2;
ExifReader.prototype._JPEG_ID_SIZE = 2;
ExifReader.prototype._JPEG_ID = 0xffd8;
ExifReader.prototype._APP_MARKER_SIZE = 2;
ExifReader.prototype._APP0_MARKER = 0xffe0;
ExifReader.prototype._APP1_MARKER = 0xffe1;
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
apple: undefined,
fruit: Em.computed.or('banana', 'apple')
});
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
toggle() {
this.incrementProperty('someState');
this.toggleProperty('isActive');
}
}
});
import Ember from 'ember';
export default Ember.Component.extend({
});