I hereby claim:
- I am gretzky on github.
- I am gretzky (https://keybase.io/gretzky) on keybase.
- I have a public key ASDBpSQKeWMHD9XO46fAYuwKJX69tPeki4hnPOhOiWD1kAo
To claim this, I am signing this object:
| { | |
| "type": "object", | |
| "properties": { | |
| "economy": { | |
| "type": "object", | |
| "properties": { | |
| "full_flex": { | |
| "type": "object", | |
| "properties": { | |
| "refundability": { |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| ## NOTE: be sure to replace the following instances in this script before running | |
| # - replace APP_NAME with the name of your application (as a single word, PascalCase. ex. "MyApp") | |
| # - replace 'zshrc' with your preferred shell config. if you don't know what this is (or you prefer zsh) you can leave this as is | |
| # install xcode command line tools if not already installed | |
| if ! xcode-select --print-path &> /dev/null; then | |
| xcode-select --install &> /dev/null |
| const createDialMachine = Machine({ | |
| id: "createDialMachine", | |
| initial: "init", | |
| context: { | |
| createDial: null, | |
| error: false, | |
| errorMsg: '', | |
| retries: 0 | |
| }, | |
| states: { |
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| const createDialMachine = Machine({ | |
| id: "createDialMachine", | |
| initial: "init", | |
| context: { | |
| createDial: null, | |
| error: false, | |
| errorMsg: '', | |
| retries: 0 | |
| }, | |
| states: { |
| for macOS Catalina, YMMV on other OS flavors | |
| 1. Open Automator | |
| 2. Select 'New document' | |
| 3. Select 'Quick Action' | |
| 4. Change 'workflow receives current' to 'image files' | |
| 5. In the far left pane, select 'Photos' | |
| 6. In the pane to the right of that, drag 'Change Type of Images' to the right | |
| 7. You'll see a pop-up. Select "don't add" | |
| 8. In the workflow, change the 'to type' to JPG (or your desired format) |
| // this method executes a reducer function on each element of the array | |
| // in this case, if the current value (b) is an array, we recurse through | |
| // and concatenate the nested element to a new, empty array (regardless of how deeply nested it is) | |
| // if the element isn't nested, we simply just add it to the new array | |
| // this approach avoids mutation of the original array | |
| // | |
| // more on .reduce - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | |
| // more on recursion/functional patterns - https://medium.com/dailyjs/functional-js-with-es6-recursive-patterns-b7d0813ef9e3 | |
| // even more on recursion - https://marmelab.com/blog/2018/02/12/understanding-recursion.html | |
| const flattenArr = (arr) => arr.reduce( |