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.Component.extend({ | |
actions: { | |
replace(){ | |
this.set('data', []); | |
}, | |
add(){ | |
this.get('data').pushObject('something'); |
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.Component.extend({ | |
init(){ | |
this._super(...arguments); | |
this.set('state', 'stopped'); | |
}, | |
didStateChanged: Ember.observer('state', 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
javascript: (function () { | |
var user = prompt('What user account you want to access?', 'defaultUser'); | |
window.location.href = 'http://mailinator.com/inbox.jsp?to=' + user; | |
}()); |
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
/* | |
* Usage: _.namespace('App.Namespace.Here'); | |
* | |
*/ | |
_.mixin({ | |
namespace: function (path) { | |
var objects = path.split('.'), | |
namespace = window; | |
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
_.mixin({ | |
namespace: function (path) { | |
var objects = path.split('.'), | |
namespace = window; | |
_.each(objects, function(obj, i){ | |
namespace[obj] = namespace[obj] || {}; | |
namespace = namespace[obj] | |
}); |
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 Forms Cascading Dropdowns | |
* | |
* CHANGES: | |
* - Remove hardcoded if for 'unit', since this is not part of the module functionality | |
* - Added extra params functionality on order to send more info on the request | |
* | |
* TODO: | |
* - add option to cache the content | |
*/ |
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
Backbone.sync = function (method, model, options) { | |
var params = _.extend({ | |
type: 'POST', | |
dataType: 'json', | |
url: model.url, | |
traditional: true, | |
contentType: 'application/x-www-form-urlencoded;charset=UTF-8' | |
}, options); |
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
_.mixin({ | |
serialize: function (obj) { | |
var urlParams = _.map(obj, function (val, key) { | |
var value = (_.isObject(val)) ? JSON.stringify(val) : String(val); | |
return String(key) + '=' + value; | |
}); | |
return urlParams.join('&'); | |
} | |
}); |
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
alias gl='git pull' | |
alias gp='git push' | |
alias gd='git diff' | |
alias gc='git commit' | |
alias gca='git commit -a' | |
alias gco='git checkout' | |
alias gb='git branch' | |
alias gs='git status' | |
alias grm="git status | grep deleted | awk '{print \$3}' | xargs git rm" |
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
//image replacement | |
.ir { | |
font: 0/0 "image replace"; | |
position: relative; | |
display: inline-block; | |
background-repeat: none; | |
} |
NewerOlder