using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
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 -i myapp-mysql mysqldump -u root -pPASSWORD DATABASE > backup.sql | |
| tar -czvf backup.tar.gz backup.sql | |
| # restore | |
| tar -zxvf backup.tar.gz | |
| sed -i -n -e '2,$p' backup.sql # remove warning message => mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1064 (42000) at line 1 | |
| docker exec -i myapp-mysql mysql -u root -pPASSWORD DATABASE < backup.sql |
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
| { | |
| "workbench.colorTheme": "Andromeda Colorizer", | |
| "workbench.iconTheme": "material-icon-theme", | |
| "window.title": "${activeEditorLong}${separator}${rootName}", | |
| "window.zoomLevel": -1, | |
| "editor.tabSize": 2, | |
| "editor.renderWhitespace": "all", | |
| "editor.rulers": [ | |
| 100 | |
| ], |
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
| #!/usr/bin/python | |
| """ | |
| Usage: | |
| python swagger-yaml-to-html.py < /path/to/api.yaml > doc.html | |
| """ | |
| import yaml, json, sys | |
| TEMPLATE = """ |
SQL to MongoDB Mapping Chart¶
In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.
Executables¶
The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.
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 crypto = require('crypto') | |
| const secretKey = crypto.randomBytes(8).toString('hex') | |
| console.log(secretKey) |