This file has been truncated, but you can view the full file.
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
alert(1); | |
/*! | |
* @overview Ember - JavaScript Application Framework | |
* @copyright Copyright 2011-2014 Tilde Inc. and contributors | |
* Portions Copyright 2006-2011 Strobe Inc. | |
* Portions Copyright 2008-2011 Apple Inc. All rights reserved. | |
* @license Licensed under MIT license | |
* See https://raw.github.com/emberjs/ember.js/master/LICENSE | |
* @version 1.7.0-beta.1+canary.6555b15a |
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
// **EDIT**: I've created an ember-cli addon for this here: | |
// | |
// https://github.com/GavinJoyce/ember-backoff | |
var delay = function(milliseconds) { | |
milliseconds = milliseconds || 2000; | |
return new Em.RSVP.Promise(function(resolve) { | |
Em.run.later(this, function() { |
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
if (!String.prototype.startsWith) { | |
Object.defineProperty(String.prototype, 'startsWith', { | |
enumerable: false, | |
configurable: false, | |
writable: false, | |
value: function(searchString, position) { | |
position = position || 0; | |
return this.lastIndexOf(searchString, position) === position; | |
} | |
}); |
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
//Controller | |
import Em from 'ember'; | |
function concatProperties(key1, key2) { | |
return Em.computed(key1, key2, function() { | |
return this.get(key1) + ' ' + this.get(key2); | |
}); | |
} |
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'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: webdis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: webdis-server - Persistent key-value db |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog $remote_fs | |
# Required-Stop: $syslog $remote_fs | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
heroku apps:create [appname] | |
heroku open | |
heroku config | |
heroku run rake [task] | |
heroku keys | |
heroku logs | |
g='git' | |
gst='git status' | |
gl='git pull' |
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'; | |
import Metrics from 'myapp/models/metrics'; | |
var FrontendStatsService = Em.Service.extend({ | |
stats: {}, | |
timings: {}, | |
start: function(key) { | |
if(window.performance) { | |
if(this.timings[key] === undefined) { //skip the first so we're not capturing data when loading the app |
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
App.Singleton = Em.Mixin.create({ | |
instance: function() { | |
if(!this._instance) { | |
this._instance = this.createInstance(); | |
} | |
return this._instance; | |
}, | |
//override this in your class |
OlderNewer