type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| // MARK: - SceneDelegate | |
| class SceneDelegate: UIResponder, UIWindowSceneDelegate { | |
| var window: UIWindow? | |
| func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { | |
| let navigationController = UINavigationController(navigationBarClass: NavigationBar.self, toolbarClass: nil) | |
| (navigationController.navigationBar as! NavigationBar).preferredHeight = 88 | |
| navigationController.setViewControllers([ViewController()], animated: false) | |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| import Foundation | |
| struct Post: Decodable { | |
| let id: String | |
| let title: String | |
| let body: String | |
| } | |
| struct GraphQLResult<T: Decodable>: Decodable { | |
| let object: T? | 
| Prefix | Description | Notes | |
|---|---|---|---|
| sk_live_ | Live secret key | Secret key in a live environment. | |
| pk_live_ | Live public key | Public key in a live environment. | |
| pst_live_ | Live Connection token | Connection token in a live environment. | |
| sk_test_ | Test secret key | Pecret key in a test environment. | |
| pk_test_ | Test public key | Public key in a test environment. | |
| pst_test_ | Test Connection token | Connection token in a test environment. | |
| ac_ | Platform Client ID | Identifier for an auth code/client id. | |
| acct_ | Account ID | Identifier for an Account object. | |
| ch_ | Charge ID | Identifier for a Charge object. | 
| # backup both tables and data | |
| docker exec -t CONTAINER pg_dumpall -c -U USERNAME > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
| # backup data only | |
| docker exec -t api_postgres_1 pg_dumpall -c -U prisma -a > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
| # apply backup | |
| cat your_dump.sql | docker exec -i CONTAINER psql -U USERNAME | 
https://www.postgresqltutorial.com/postgresql-backup-database/
docker exec -t your-db-container pg_dump -U strapi -W -F t database-name > mypostgres_strapi_`date +%d-%m-%Y"_"%H_%M_%S`.sql
docker exec -t your-db-container pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
| Backup: | |
| docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
| Restore: | |
| cat your_dump.sql | docker exec -i your-db-container psql -Upostgres | 
| document.querySelector('[contenteditable]').addEventListener('paste', function (event) { | |
| event.preventDefault(); | |
| document.execCommand('inserttext', false, event.clipboardData.getData('text/plain')); | |
| }); |