This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Hadoken Easter Egg | |
Author: Aaron Ghent | |
*/ | |
/* global $ */ | |
var hadoken = function() { | |
if($('.hadoken').length > 0) { | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Em from 'ember'; | |
var locked = false; | |
var adNetwork = function(imagePath, options) { | |
function run() { | |
var ImageMarkup = '<img id="adNetwork" style="display: none" src="' + imagePath + '" />'; | |
var defaults = { | |
css: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
var NativeObjectMixin = Ember.Mixin.create({ | |
toNative: function() { | |
var properties = []; | |
for (var key in this) { | |
var types = ['string', 'number', 'boolean']; | |
if (types.contains(Ember.typeOf(this[key]))) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates a mixin that saves hasMany relations (this comes in handy when filtering tree data) | |
* | |
* @class ModelSaveRelationsMixin | |
* @main ModelSaveRelationsMixin | |
* @constructor | |
*/ | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @main EmberArrayAsync | |
*/ | |
/** | |
* forEachAsync iterates over a large array gradually. The function | |
* will process items in the array for a given number of ms, stop iterating for | |
* a given wait time, then proceed and wait until the iteration is complete. | |
* | |
* @method forEachAsync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @name: Modal Mixin | |
* @framework: Ember.JS | |
* @author: Aaron Ghent | |
*/ | |
App.ModalMixin = Ember.Mixin.create({ | |
defaultModal: 'modal', | |
modalsOpen: {}, | |
actions: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ui] | |
merge = p4merge | |
[extensions] | |
hgext.extdiff = | |
[extdiff] | |
cmd.p4diff = p4merge | |
[tortoisehg] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# p4merge for 64 bit | |
wget http://www.perforce.com/downloads/perforce/r13.4/bin.linux26x86_64/p4v.tgz | |
# p4merge for 32 bit | |
# wget http://www.perforce.com/downloads/perforce/r13.4/bin.linux26x86/p4v.tgz | |
tar zxvf p4v.tgz | |
sudo cp -r p4v-* /usr/local/p4v/ | |
sudo ln -s /usr/local/p4v/bin/p4merge /usr/local/bin/p4merge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var get = Ember.get; | |
var forEach = Ember.EnumerableUtils.forEach; | |
/** | |
The EmbeddedRecordsMixin allows you to add embedded record support to your | |
serializers. | |
To set up embedded records, you include the mixin into the serializer and then | |
define your embedded relations. | |
```js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# >><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><< # | |
# Sync's models against database | |
# >><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><< # | |
from cStringIO import StringIO | |
import sys | |
import re | |
import os | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") |