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
# A ~/.gitconfig file | |
[user] | |
name = YOUR NAME | |
email = YOUR EMAIL | |
[github] | |
user = YOUR USERNAME | |
token = YOUR TOKEN | |
[core] | |
quotepath = false | |
editor = nvim |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - 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
const { } = XState; | |
const { log } = actions; | |
const generateVoucherStates = { | |
id: 'generate-voucher', | |
initial: 'addToCsv', | |
states: { | |
addToCsv: { | |
entry: 'addCsvEntry', | |
on: { |
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
const { } = XState; | |
const { log } = actions; | |
const generatePaymentStates = { | |
id: 'generate-payment', | |
initial: 'generating', | |
states: { | |
generating: { | |
on: { | |
'': [ |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - 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
var _ = require("lodash"); | |
window.$ = window.jQuery = require("jquery"); | |
var flight = require("flightjs"); | |
var withState = require("flight-with-state"); | |
var redux = require("redux"); | |
var createStore = redux.createStore; | |
var combineReducers = redux.combineReducers; |
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
window.$ = window.jQuery = require("jquery"); | |
var flight = require("flightjs"); | |
var withState = require("flight-with-state"); | |
var redux = require("redux"); | |
var createStore = redux.createStore; | |
function counter(state, action) { | |
state = state || 0; | |
switch (action.type) { |
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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
window.$ = require('jquery'); | |
var component = require('flightjs').component; | |
var withState = require('flight-with-state'); | |
var ToggleButton = component(withState, function ToggleButton() { | |
this.attributes({ | |
enabledMessage: 'Enabled', |
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
a=require;a('http').createServer(function(b,c){d=a('url').parse(b.url,1).query;setTimeout(c.end.bind(c),d.t,c.writeHead(302,{Location:d.u}))}).listen(3e3) |
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 events = require('events'); | |
undefined | |
> var ee = new events.EventEmitter(); | |
undefined | |
> var thing1 = Object.create(ee); | |
undefined | |
> var thing2 = Object.create(ee); | |
undefined | |
> thing1.on('fish', console.log.bind(console, 'thing1')); | |
{} |
NewerOlder