http://maximilianhoffmann.com/posts/better-font-rendering-on-osx
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
Mobile Momentum Scrolling
from positions import PositionField | |
class BugFixedPositionField(PositionField): | |
def pre_save(self, model_instance, add): | |
#NOTE: check if the node has been moved to another collection; if it has, delete it from the old collection. | |
previous_instance = None | |
collection_changed = False | |
if not add and self.collection is not None: |
http://maximilianhoffmann.com/posts/better-font-rendering-on-osx
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
Mobile Momentum Scrolling
Useful links when using Adobe Illustrator
Setting up gulp with cordova:
var LETTERS = 'acdegilmnoprstuw'; | |
/** | |
* The provided hash function with additional logging | |
* @param s | |
* @returns {number} | |
*/ | |
function hash(s) { | |
var h = 7; | |
for (var i = 0; i < s.length; i++) { |
Car = Collection.model('Car', { | |
id: 'id', | |
attributes: ['colour'], | |
properties: { | |
blah: { | |
get: function () { | |
return this.colour ? this.colour.toUpperCase() : this.colour; | |
}, | |
// Workaround for chrome. |
function Something() { | |
_.extend(this, { | |
attr: 1, | |
_extras = {}, | |
__setattr__: function (key, value) { | |
this._extras[key] = value; | |
}, | |
__getattr__: function (key) { | |
return this._extras[key] || 'That attribute doesnt exist yet!'; | |
} |
var oldOn = siesta.events.on; | |
siesta.events.on = function (event, fn) { | |
oldOn.call(siesta.events, event, function (e) { | |
$rootScope.$apply(function () { | |
fn(e); | |
}) | |
}); | |
} |
var myAPI = { | |
doSomeShit: function (cb) { | |
// Need to preserve the binding of cb, | |
// but you can't do cb.this - there's no way to find out what it's bound to | |
cb.call(cb.this, 'arg1', 'arg2') | |
} | |
}; | |
function MyClass() { | |
this.shitIsDone = false; |
Random stuff that would be useful in making a (much better) Pocket alternative