Skip to content

Instantly share code, notes, and snippets.

View massimoselvi's full-sized avatar

Massimo Selvi massimoselvi

View GitHub Profile

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@massimoselvi
massimoselvi / machine.js
Last active June 27, 2022 07:36
Generated by XState Viz: https://xstate.js.org/viz
// https://xstate.js.org/viz/?gist=0ab04d9bf6d58b03d82bd0609e178eb7
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
@massimoselvi
massimoselvi / machine.js
Last active December 20, 2020 08:09
Generated by XState Viz: https://xstate.js.org/viz
/*
* AUTH FLOW example
* https://xstate.js.org/viz/?gist=df5ae16471d6fc3c5ddacf74a19d22c3
*/
// Available variables:
// - Machine
// - interpret
// - assign
// - send
@massimoselvi
massimoselvi / machine.js
Last active March 13, 2020 08:38
Generated by XState Viz: https://xstate.js.org/viz
/*
Lambda Sequencer
preview: https://xstate.js.org/viz/?gist=31505a4986fab5d82190d55eec826648
*/
const machine = Machine({
id: 'handler',
initial: 'idle',
states: {
idle: {
@massimoselvi
massimoselvi / machine.js
Last active December 20, 2020 08:08 — forked from sbussard/machine.js
Generated by XState Viz: https://xstate.js.org/viz
/*
* User centric API
* preview: https://xstate.js.org/viz/?gist=6a454e83ee19acb9ab1a79b0657dd60f
*/
// Available variables:
// - Machine
// - interpret
// - assign
@massimoselvi
massimoselvi / machine.js
Last active December 20, 2020 08:06
Generated by XState Viz: https://xstate.js.org/viz
/*
* Entity CRUD
* preview: https://xstate.js.org/viz/?gist=31505a4986fab5d82190d55eec826648
*/
const machine = Machine({
id: 'handler',
initial: 'idle',
states: {
idle: {
@massimoselvi
massimoselvi / machine.js
Last active December 20, 2020 08:06
Generated by XState Viz: https://xstate.js.org/viz
/*
* Entity CRUD bis
* preview: https://xstate.js.org/viz/?gist=5cee8452667147d56aa04f4bbfb0ed2d
*/
const machine = Machine({
id: 'fetch',
initial: 'idle',
states: {
idle: {
@massimoselvi
massimoselvi / machine.js
Last active December 20, 2020 08:04
Generated by XState Viz: https://xstate.js.org/viz
// https://xstate.js.org/viz/?gist=caa428d6095266ec9cb79b033c7d9017
/*
* https://xstate.js.org/viz/?gist=caa428d6095266ec9cb79b033c7d9017
*/
const yellowStates = {
initial: 'normal',
context: {
blinking: false
@massimoselvi
massimoselvi / machine.js
Last active December 20, 2020 08:11
Generated by XState Viz: https://xstate.js.org/viz
/*
* FETCH MACHINE bis (work in progress)
* preview: https://xstate.js.org/viz/?gist=a3768c794e1d159d1740225d0899c43c
* previous: https://xstate.js.org/viz/?gist=0291cafd5f583c165a3ef1dd35bf02af
*/
// Available variables:
// Machine (machine factory function)
// assign (action)
// XState (all XState exports)
@massimoselvi
massimoselvi / machine.js
Last active December 20, 2020 08:10
Generated by XState Viz: https://xstate.js.org/viz
/*
* FETCH MACHINE (work in progress)
* preview: https://xstate.js.org/viz/?gist=0291cafd5f583c165a3ef1dd35bf02af
*/
// Available variables:
// - Machine
// - interpret
// - assign
// - send