Skip to content

Instantly share code, notes, and snippets.

View OrdinaryJellyfish's full-sized avatar

Tristian Kelly OrdinaryJellyfish

View GitHub Profile
# Check gist comments to verify system PATH and or adapt it.
wget https://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.gz
tar zxvf glibc-2.29.tar.gz
cd glibc-2.29
mkdir build
cd build
../configure --prefix=/opt/glibc-2.29
make -j4
sudo make install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/glibc-2.29/lib
@OrdinaryJellyfish
OrdinaryJellyfish / cluster.js
Created September 18, 2018 12:43
Simple Cluster example for Node.js
const cluster = require('cluster')
const numCPUs = require('os').cpus().length
if (cluster.isMaster) {
console.log(`Master ${process.pid} is running`)
// Basic Multi-process Functionality
for (let i = 0; i < numCPUs; i++) {
cluster.fork()
}