Anwar

Posts

How to set a interval with Puppeteer to run a certain amount of time?

const puppeteer = require(‘puppeteer’); (async () => { let game = ‘https://lichess.org/hj4DgCNN9BKG’; let browser = await puppeteer.launch({ headless: false }); let page = await browser.newPage();...

Shell Script To Update MaxMind GeoIP Database

chown -R runcloud:runcloud /usr/share/GeoIP/ cp /usr/share/GeoIP/GeoIP2-Country.mmdb /home/runcloud/webapps/app-staging21-2gamecms-com/storage/app/maxmind/GeoIP2-Country.mmdb cd /usr/share/GeoIP/ # Regular cron job for the geoipupdate package, used to update GeoIP databases # # According...

How to set timezone in node js

const nDate = new Date().toLocaleString(‘en-US’, { timeZone: ‘Asia/Calcutta’ });   console.log(nDate);   Example package.json: {  “scripts”: {    “start”: “TZ=’UTC’ node index.js”  }} Reference: https://stackoverflow.com/questions/8083410/how-can-i-set-the-default-timezone-in-node-js https://www.codegrepper.com/code-examples/javascript/node+js+date+set+timezone...

Error to install PM2 globally on Ubuntu Server 20.04LTS

Step 3 — Installing PM2 Next let’s install PM2, a process manager for Node.js applications. PM2 makes it possible to daemonize applications so that they...

Configure DDoS event alarm notification

You can configure the alert notification method of the Anti-Defend IP service on the management console of the message center. Steps Log Message Center management console....

Magento 2 git deployment

For Initialisation and Installation follow the steps from Alex his answer for most of the steps, only differences I would recommend: Git configuration Only store...

How to change theme in magento 2

Steps to Change Theme in Magento 2: Log in to Admin Panel. Navigate to Content > Design > Configuration. Click Edit theme. In Applied Theme...

Close a Puppeteer Browser using its contextId?

For Node.js: // Lets say for example we’re instantiating our browser like thisconst browser = await puppeteer.launch({ headless: false }); // You can simply run this...

Magento2 access key update

Previous examples are correct. In addition it is also possible by composer’s config command. Inside the Magento project directory execute the following Composer command: $ composer config...