I hereby claim:
- I am mcky on github.
- I am mcky (https://keybase.io/mcky) on keybase.
- I have a public key ASC5egnAvqyxg8PXq4SuM0Gyt9BHCgUwoN7EvUM7F3kGXQo
To claim this, I am signing this object:
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| // Copied from https://twitter.com/MikeRyanDev/status/1308472279010025477 | |
| // Don't need most of the token parsing, but leaving it in until the POC is complete because I'll probably | |
| // break it all trying to remove it | |
| type Split<S extends string, D extends string> = S extends `${infer T}${D}${infer U}` ? [T, ...Split<U, D>] : [S]; | |
| type TakeLast<V> = V extends [] ? never : V extends [string] ? V[0] : V extends [string, ...infer R] ? TakeLast<R> : never; | |
| type TrimLeft<V extends string> = V extends ` ${infer R}` ? TrimLeft<R> : V; | |
| type TrimRight<V extends string> = V extends `${infer R} ` ? TrimRight<R> : V; | |
| type Trim<V extends string> = TrimLeft<TrimRight<V>>; | |
| type StripModifier<V extends string, M extends string> = V extends `${infer L}${M}${infer A}` ? L : V; | |
| type StripModifiers<V extends string> = StripModifier<StripModifier<StripModifier<StripModifier<V, '.'>, '#'>, '['>, ':'>; |
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| const algoliasearch = require('algoliasearch'); | |
| const request = require('request'); | |
| const ndjson = require('ndjson'); | |
| const {bindNodeCallback} = require('rxjs'); | |
| const {streamToRx} = require('rxjs-stream'); | |
| const {bufferCount, map, mergeMap, toArray, tap} = require('rxjs/operators'); | |
| // Algolia configuration | |
| const algoliaApp = process.env.ALGOLIA_APP_ID; |
I hereby claim:
To claim this, I am signing this object:
| const splitArray = (array, callback) => { | |
| return [array.filter(i => callback(i)), array.filter(i => !callback(i))] | |
| } |
| #!/bin/bash | |
| # Requires: | |
| # - mondo-bank (`npm install mondo-bank -g`) | |
| # - jq (`brew install jq`) | |
| export PATH="/usr/local/bin:/usr/bin/:$PATH"; | |
| JSON=$(mondo balance --account_id=YOURID) | |
| BALANCE=$(echo $JSON | jq '.balance' | awk '{print "£"$1/100}') | |
| SPENT=$(echo $JSON | jq '.spend_today' | awk '{print "£"$1/100}') |
| #{specificity('.one', 5)} { | |
| background: purple; | |
| } | |
| @include specificity('.two', 5) { | |
| background: red; | |
| } | |
| /* | |
| * Outputs |
| toggleThing: function(thing){ | |
| this.setState({ | |
| [thing]: !this.state[thing] | |
| }) | |
| } |