Skip to content

Instantly share code, notes, and snippets.

View brawlins's full-sized avatar

Brett Rawlins brawlins

  • Salt Lake City, UT
View GitHub Profile
Machine(
{
id: 'validateProperty',
type: 'parallel',
initial: 'address',
context: {},
states: {
address: {
id: 'address',
initial: 'idle',
const blah = Machine(
{
id: 'validateProperty',
type: 'parallel',
initial: 'address',
context: {},
states: {
address: {
id: 'address',
initial: 'idle',
const validatePropertyMachine = Machine(
{
id: 'validateProperty',
type: 'parallel',
initial: 'address',
context: {},
states: {
address: {
id: 'address',
initial: 'idle',
@brawlins
brawlins / machine.js
Last active May 1, 2020 18:03
Generated by XState Viz: https://xstate.js.org/viz
const validatePropertyMachine = Machine(
{
id: 'validateProperty',
type: 'parallel',
initial: 'address',
context: {},
states: {
address: {
id: 'address',
initial: 'idle',
@brawlins
brawlins / machine.js
Last active April 30, 2020 21:32
Generated by XState Viz: https://xstate.js.org/viz
const validatePropertyMachine = Machine(
{
id: 'validateProperty',
type: 'parallel',
initial: 'address',
context: {},
states: {
address: {
id: 'address',
initial: 'idle',
@brawlins
brawlins / pruneLocalBranches.sh
Last active July 19, 2018 13:22
Shell script that deletes local git branches that were deleted on the remote
# Deletes local branches that have been deleted on the remote
# Make sure you're on master because it should never get pruned
git checkout master &> /dev/null
# Prune branches
git fetch origin --prune &> /dev/null
# List branches that have been removed from origin and write to file
git branch -vv | awk '/: gone]/{print $1}' > /tmp/branchesToPurge
@brawlins
brawlins / SvgIcon.js
Last active February 2, 2016 15:18
React component for using SVG icons in your application.
"use strict";
var React = require('react');
/**
* SVG icon component
*
* Renders an icon with the given symbol id. Assumes you have a SVG definitions
* document with symbols defined. React sometimes chokes on SVGs defined in
* JSX, so a workaround is to wrap it in a tag and set the inner HTML of that