Skip to content

Instantly share code, notes, and snippets.

View orther's full-sized avatar
🏠
Working from home

Brandon Orther orther

🏠
Working from home
View GitHub Profile
@orther
orther / machine.js
Last active May 8, 2021 06:58
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@orther
orther / machine.js
Created April 29, 2021 08:54
Generated by XState Viz: https://xstate.js.org/viz
const what_can_i_order = {
id: 'what_can_i_order',
type: 'compound',
initial: 'consulting_bom_team',
states: {
consulting_bom_team: {
on: {
CONSULTED: 'done'
}
},
@orther
orther / MEMOIZE.md
Created April 20, 2021 05:36 — forked from mrousavy/MEMOIZE.md
Memoize!!! 💾 - a react (native) performance guide
In computing, memoization or memoisation
is an optimization technique used primarily
to speed up computer programs by storing
the results of expensive function calls and  
returning the cached result when the same
inputs occur again.                                         
                                                     — wikipedia
@orther
orther / aws-iot-update-thing-shadow-lambda-function.js
Created January 15, 2021 07:38 — forked from dave-malone/aws-iot-update-thing-shadow-lambda-function.js
AWS Lambda function example of how to update IoT Thing Shadows
const AWS = require('aws-sdk')
AWS.config.region = process.env.AWS_REGION
const iotdata = new AWS.IotData({
endpoint: process.env.MQTT_BROKER_ENDPOINT,
accessKeyId: process.env.ACCESS_KEY_ID,
secretAccessKey: process.env.SECRET_ACCESS_KEY
})
@orther
orther / parler-video.md
Created January 14, 2021 17:49 — forked from kylemcdonald/parler-video.md
How to view a video on Parler.

How to view a video on Parler

Let's say you have a video ID, like wfy02V209EwU taken from this map

The link for the video kiBnNejo0JW0 is at https://video.parler.com/ki/Bn/kiBnNejo0JW0. Notice that the link is: https://video.parler.com/ followed by the first two characters of the video ID, then /, then the next two characters, another /, and the video ID.

But if you click on this, you will get an error.

This is because the Parler video servers are still running (as of January 12) but the Domain Name System (DNS) is not running.

@orther
orther / machine.js
Last active November 13, 2020 04:28
Generated by XState Viz: https://xstate.js.org/viz
const bleManager = Machine({
id: 'bleManager',
initial: 'disconnected',
context: {
phoneBleState: null,
session: null,
publisher: null,
streams: null,
token: null
},
@orther
orther / machine.js
Created November 13, 2020 03:53
Generated by XState Viz: https://xstate.js.org/viz
const video = Machine({
id: 'video',
initial: 'disconnected',
context: {
sessionId: null,
session: null,
publisher: null,
streams: null,
token: null
},
@orther
orther / machine.js
Created November 11, 2020 19:16
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@orther
orther / 00-intro.md
Created August 19, 2020 21:16 — forked from mdo/00-intro.md
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

@orther
orther / machine.js
Created April 25, 2020 21:57
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions