Skip to content

Instantly share code, notes, and snippets.

Tom Ashworth tgvashworth

Block or report user

Report or block tgvashworth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View machine.js
const { } = XState;
const { log } = actions;
const generateVoucherStates = {
id: 'generate-voucher',
initial: 'addToCsv',
states: {
addToCsv: {
entry: 'addCsvEntry',
on: {
View machine.js
const { } = XState;
const { log } = actions;
const generatePaymentStates = {
id: 'generate-payment',
initial: 'generating',
states: {
generating: {
on: {
'': [
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@tgvashworth
tgvashworth / index.js
Created Apr 16, 2016
requirebin sketch
View index.js
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;
@tgvashworth
tgvashworth / index.js
Created Apr 16, 2016
requirebin sketch
View index.js
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) {
@tgvashworth
tgvashworth / index.js
Created Mar 18, 2016
requirebin sketch
View index.js
// 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',
View -
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDL8wZcK7Jd4dPbOhInow1qbJ8zd+KTmm5Fc0BcYkKy6hFshXnrZtXqJGauXQwUCc7Z+9Nz8eEqUL1eB0PtHfBhRGDxFTfUAKtUmLfAaT3ePqOROvXVIXTiCFA9uof2YNcv+wAzrg81h0nHtmGxMrB/tyNuDDqwZHhD+my6xmfZxv5Y3o8GygF+mDIYaoOzpDONrRDprC7tdia+BFUXTpUd4JmGllCZko/3RFhsywS27OBDMwrPLe6UCRZizayJnLUHtlBU789m60afSx2O4xTVyBXE/qEPFSYW1RdsedQ1mdx5vcKJolrY5BBcaicHRVyi1QPIPc3IKJeMHJrPlZaz tashworth@twitter.com
View -
[color]
diff = auto
status = auto
branch = auto
ui = true
[help]
autocorrect = 1
[mergetool]
View Usage:
$ ./run some-file-to-run.js
You can’t perform that action at this time.