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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# See https://github.com/facebook/flipper/issues/262 | |
import os | |
import sys | |
import syslog | |
import shlex | |
import time | |
import subprocess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const what_can_i_order = { | |
id: 'what_can_i_order', | |
type: 'compound', | |
initial: 'consulting_bom_team', | |
states: { | |
consulting_bom_team: { | |
on: { | |
CONSULTED: 'done' | |
} | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
}) |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bleManager = Machine({ | |
id: 'bleManager', | |
initial: 'disconnected', | |
context: { | |
phoneBleState: null, | |
session: null, | |
publisher: null, | |
streams: null, | |
token: null | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const video = Machine({ | |
id: 'video', | |
initial: 'disconnected', | |
context: { | |
sessionId: null, | |
session: null, | |
publisher: null, | |
streams: null, | |
token: null | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |