type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| /* | |
| Here's all you have to do to add clustering to your node.js application. | |
| - save this code as `cluster.js`, and run `cluster.js` instead of `server.js` | |
| - the only line you'll need to change is the last line - it needs to point to the location of your `server.js` file | |
| */ | |
| var cluster = require('cluster'); | |
| if (cluster.isMaster) { | |
| // Count the machine's CPUs |
| <?php | |
| /** | |
| * Get Header Authorization | |
| */ | |
| function getAuthorizationHeader(){ | |
| $headers = null; | |
| if (isset($_SERVER['Authorization'])) { | |
| $headers = trim($_SERVER["Authorization"]); | |
| } | |
| else if (isset($_SERVER['HTTP_AUTHORIZATION'])) { |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
The module used to create and manage virtual environments is called venv. venv will usually install the most recent version of Python that you have available. If you have multiple versions of Python on your system, you can select a specific Python version by running python3 or whichever version you want.
To create a virtual environment, decide upon a directory where you want to place it, and run the venv module as a script with the directory path:
python3 -m venv tutorial-envThis will create the tutorial-env directory if it doesn’t exist, and also create directories inside it containing a copy of the Python interpreter and various supporting files.