To use the install script and set up MacOS:
/bin/zsh <(curl -sL https://gist.github.com/amogower/f05554070d10cc036ba8cbc9968a954e/raw/install.sh)| -- Get Max ID from table | |
| SELECT MAX(id) FROM table; | |
| -- Get Next ID from table | |
| SELECT nextval('table_id_seq'); | |
| -- Set Next ID Value to MAX ID | |
| SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)); |
| function sendMoney(account, amount) { | |
| if (account.balance < amount) { | |
| console.log('Insufficient funds'); | |
| return; | |
| } | |
| if (amount <= 0) { | |
| console.log('Invalid transfer amount'); | |
| return; | |
| } | |
| if (account.sender !== 'user-token') { |
Last updated March 28, 2021
There are now two ways to approach this:
This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
I hereby claim:
To claim this, I am signing this object:
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| const selectionMachine = Machine({ | |
| id: 'selection', | |
| context: { | |
| stake: '', | |
| }, | |
| initial: 'active', | |
| states: { | |
| active: { | |
| initial: 'idle', | |
| states: { |
| const singleMachine = Machine({ | |
| id: 'single', | |
| initial: 'winOnly', | |
| context: { | |
| stake: '', | |
| }, | |
| states: { | |
| winOnly: { | |
| id: 'winOnly', | |
| initial: 'idle', |
| const singleBetMachine = Machine({ | |
| id: 'singleBet', | |
| initial: 'default', | |
| context: { | |
| isEachWay: false, | |
| stake: '', | |
| }, | |
| states: { | |
| default: { | |
| on: { |