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 Marty from 'marty'; | |
import OfferConstants from './OfferConstants'; | |
import OfferQueries from './Queries'; | |
class OffersStore extends Marty.Store { | |
constructor(options){ | |
super(options); | |
this.state = []; | |
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
class Foo { | |
constructor() { | |
this.getFoo() | |
} | |
get getFoo() { | |
return function () { | |
console.log('foo'); | |
} | |
} |
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 ActionStore = require('marty/stores/actionStore'); | |
var actionToken = ActionCreators.someAction(); | |
ActionStore.addChangeListener(function () { | |
var action = ActionStore.getAction(actionToken); | |
console.log(action.status, action.error) | |
}); |
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 UsersStore = Marty.createStore({ | |
handlers: { | |
addUser: [UserConstants.ADD_USER, UserConstants.CREATE_USER] | |
}, | |
addUser: function (user) { | |
this.state[user.id] = user; | |
this.hasChanged(); | |
return function actionFailed(error) { | |
this.state.errors[user.id] = error; |
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 UserState = Marty.createStateMixin({ | |
listenTo: [ActionStore, UserStore], | |
getState: function () { | |
return { | |
user: UserStore.getById(123), | |
createUser: ActionStore.getStatus(this.createUserToken) | |
}; | |
} | |
}) |
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
<snippet> | |
<content><![CDATA[ | |
define(function(require) { | |
var \$ = require('jquery'), | |
_ = require('underscore'), | |
Backbone = require('backbone') | |
${1:Content} | |
}) | |
]]></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
FOR /F "delims=" %%i IN ('git rev-parse --abbrev-ref HEAD') DO git branch --set-upstream %%i origin/%%i |
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
public static string[] Split(this string str, string separator) | |
{ | |
return str.Split(new [] { separator }, StringSplitOptions.None); | |
} |
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
deploy-website ` | |
-Server = "Foo" ` | |
-Website = "Foo" ` | |
-AppPool = "Foo" ` | |
-Source = "Foo" |
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
//this javascript works | |
"=foo".replace(/=/,''); | |
#but this coffeescript does not work (turns out due to a known issue https://github.com/jashkenas/coffee-script/issues/1399) | |
"=foo".replace(/=/,'') | |
#but as you say, this works | |
"=foo".replace(/\=/,'') | |