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
| <?php /** @noinspection PhpUndefinedMethodInspection */ | |
| namespace App\Console\Commands; | |
| use Altek\Accountant\Context; | |
| use Altek\Accountant\Notary; | |
| use App\Models\Audit; | |
| use App\Models\Ledger; | |
| use Illuminate\Console\Command; |
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 conversationMachine = Machine({ | |
| id: 'ConversationMachine', | |
| initial: 'idle', | |
| context: { | |
| Yap: undefined, | |
| User: undefined, | |
| }, | |
| // either sending messages, receiving messages, or neither. | |
| // can send and receive at same time. |
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 yapsMachine = Machine({ | |
| id: 'yaps', | |
| initial: 'loading', | |
| context: { | |
| User: {}, | |
| yaps: null, | |
| Yap: null, | |
| }, | |
| states: { | |
| loading: { |
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 messagingMachine = Machine({ | |
| id: 'messaging', | |
| initial: 'idle', | |
| context: { | |
| // | |
| }, | |
| // either sending messages, receiving messages, or neither. | |
| // can send and receive at same time. | |
| type: 'parallel', | |
| states: { |
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 YapsMachine = Machine({ | |
| id: 'yap', | |
| initial: 'unknown', | |
| context: { | |
| Yap: { | |
| id: 123, | |
| status: { | |
| description: 'New' | |
| } | |
| }, |
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
| import typeOf from 'just-typeof'; | |
| const colors = { | |
| heading: '#86c0d1', | |
| title: '#80a0c2', | |
| subtitle: '#a2bf8a', | |
| body: '#d8dee9', | |
| }; | |
| const styles = { |
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 fetchMachine = Machine({ | |
| id: 'fetch', | |
| initial: 'ready', | |
| context: { | |
| retries: 0 | |
| }, | |
| states: { | |
| ready: { | |
| invoke: { | |
| src: 'listenForTypingOnChannel', |
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 fetchMachine = Machine({ | |
| id: 'fetch', | |
| initial: 'ready', | |
| context: {}, | |
| states: { | |
| ready: { | |
| invoke: [{ | |
| src: 'listenForRecipientTyping', |
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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
| $ redis-cli | |
| > config set stop-writes-on-bgsave-error no |