Skip to content

Instantly share code, notes, and snippets.

/*
Ok why the hell do we want this function?
The secret lies in understanding how Reselect and Immutable js work, and utilising equality comparators
correctly. Remember folks, understand your tools.
Reselect:
--------------
The way a reselect.createSelector works is as follows:
Take N number of comparator functions, and check if the current value is equal to the previous value
- If the values havent changed, return the previously memoized version
@mcspud
mcspud / oracle.md
Created February 25, 2019 05:27 — forked from ddanailov-nmdp/oracle.md
Installing Oracle 11g on OS X 10.11 El Capitan
@mcspud
mcspud / derp
Created September 18, 2019 04:33
Machine({
id: 'Update Email',
initial: 'view_email',
context: {
elapsed: 0,
entry: 'east'
},
states: {
view_email: {
on: {
@mcspud
mcspud / machine.js
Created September 18, 2019 04:37
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: 'Update Email',
initial: 'view_email',
context: {
elapsed: 0,
entry: 'east'
},
states: {
view_email: {
on: {
const otp_satisfied = (context, event) => {
console.log('otp_satisfied: ', context, event)
return true
}
const determine_challenge_type = (context, event) => {
console.log('determine_challenge_type', context, event)
return 'hello'
}
const emails_match = (context, event) => true
const log_result = (context, event) => console.log(context, event)
@mcspud
mcspud / machine.js
Created September 19, 2019 06:02
Generated by XState Viz: https://xstate.js.org/viz
const getOtherContactsAction = async () => await fetch('google.com')
const load_email_details_machine = Machine({
id: 'load_contact_details_machine',
initial: 'loading',
context: {
contactData: {}
},
states: {
loading: {
@mcspud
mcspud / machine.js
Created September 26, 2019 01:28
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@mcspud
mcspud / machine.js
Last active October 13, 2019 02:01
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
{
"Columns@": [],
"Individuals@": [],
"IsOffline@": true,
"Packages@": [],
"PrimaryKeys@": [],
"Relationships@": [],
"SprocsParams@": [],
"Sprocs@": [
{
{
"Columns@": [],
"Individuals@": [],
"IsOffline@": true,
"Packages@": [],
"PrimaryKeys@": [],
"Relationships@": [],
"SprocsParams@": [],
"Sprocs@": [
{