A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| # Create a container from the mongo image, | |
| # run is as a daemon (-d), expose the port 27017 (-p), | |
| # set it to auto start (--restart) | |
| # and with mongo authentication (--auth) | |
| # Image used is https://hub.docker.com/_/mongo/ | |
| docker pull mongo | |
| docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth | |
| # Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception) | |
| # add a root user |
| // Create a file plugins/fetch.js | |
| // Add plugin in nuxt.config.js | |
| const checkStatus = response => { | |
| if (response.status >= 200 && response.status < 300) { | |
| return response; | |
| } else { | |
| var error = new Error(response.statusText); | |
| error.response = response; | |
| throw error; | |
| } |
| # First install Chrome, and the Selenium driver | |
| # Next, download and save the MetaMask CRX (there are plenty of guides on how to do this) | |
| from selenium import webdriver | |
| from webdriver_manager.chrome import ChromeDriverManager | |
| from selenium.webdriver.chrome.options import Options | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.common.keys import Keys | |
| import time |