Skip to content

Instantly share code, notes, and snippets.

View MoonTahoe's full-sized avatar

Alex Banks MoonTahoe

View GitHub Profile
@MoonTahoe
MoonTahoe / machine.js
Last active November 16, 2020 19:58
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'timer',
initial: 'idle',
context: {
index: 0
},
states: {
idle: {
on: {
START: 'recording'
@MoonTahoe
MoonTahoe / upload.yaml
Last active June 3, 2024 09:42
Github Action to build iOS app with expo and upload to testflight
# Just place this file in your repo under the .github/workflows folder.
# You set all of the secrets in the setting of the repo
name: Deploy to Testflight
# When a pull request is closed...
# This is because this action commits back to the repository
# so setting this on a push would cause an infinite loop of commits
# unless you pragmatically check the contents of the repo or something
@MoonTahoe
MoonTahoe / Sample of Timesplitter Gherkin
Created April 7, 2020 23:47
I built the Timesplitter using 100% BDD. I wrote all of the Gherkin and the tests before developing each feature.
Feature: Timing an Agenda
As a Leader I want to time my agendas
so that I can know how long it really takes
to run my agendas
Background:
Given the following agenda:
| HOW TO CAMP | time |
| What is camping? | 3 min |
| History of camping | 2 min |
Feature: Timing an Agenda
As a Leader I want to time my agendas
so that I can know how long it really takes
to run my agendas
Background:
Given the following agenda:
| HOW TO CAMP | time |
| What is camping? | 3 min |
| History of camping | 2 min |
@MoonTahoe
MoonTahoe / machine.js
Created November 14, 2019 03:17
Generated by XState Viz: https://xstate.js.org/viz
const seedToSale = Machine({
id: "canabis-regulation",
initial: "idle",
states: {
idle: {
on: {
TAG_RECEIVED: "seed"
}
},
seed: {
@MoonTahoe
MoonTahoe / machine.js
Created November 14, 2019 01:40
Generated by XState Viz: https://xstate.js.org/viz
const walk = assign({
distance: (context, event) => context.distance - 1
});
const ride = assign({
distance: (context, event) => context.distance - 5
})
const hasArrived = (context, event) => context.distance <= 0;
@MoonTahoe
MoonTahoe / machine.js
Last active November 14, 2019 00:47
Generated by XState Viz: https://xstate.js.org/viz
const tahoeTravelMachine = Machine({
id: 'tahoe-travel',
initial: 'walking',
states: {
walking: {
on: {
THUMBS_UP: 'hitchhiking',
ARRIVE: 'arrived'
}
},
@MoonTahoe
MoonTahoe / machine.js
Last active November 13, 2019 20:23
Generated by XState Viz: https://xstate.js.org/viz
const lightBulbMachine = Machine({
id: 'light',
initial: 'unlit',
context: {
color: "blue"
},
states: {
lit: {
on: {
TOGGLE:'unlit',
td:last-child {
padding: 5px;
width: 100px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
}
td div {
@MoonTahoe
MoonTahoe / .babelrc
Created October 16, 2017 02:33
Server Render Recipes Start Files
{
"presets": [
"env",
"stage-0",
"react"
]
}