Changing the Node.js inspector port in phpStorm

You can launch the Node.js debugger when working with Node.js inside phpStorm /bin/node –inspect-brk=0.0.0.0:50407 /var/www/example.js Debugger listening on ws://0.0.0.0:50407/49a2d585-05b1-438e-a53c-6b2943c684df For help, see: https://nodejs.org/en/docs/inspector Debugger attached. This also starts the node inspector you can open in Google Chrome, but it uses a random port every time you relaunch the debugger. This may be an issue if… Continue reading Changing the Node.js inspector port in phpStorm

Samsung monitor not working with Raspberry PI over HDMI

I use my Raspberry PI with a Samsung SyncMaster SA650, and once in a while it would stop receiving signal. The cable and the monitor both work. Only when I connected to the RPi over VNC I had realised it has the wrong screen resolution. So the solution is to set the resolution back to… Continue reading Samsung monitor not working with Raspberry PI over HDMI

Working with HTTP request type (method) in CakePHP

Get the request type (method): $this->request->getMethod() (For the older versions before 3.4, use $this->request->method()) Check the request type (method): $this->request->is('post'); Documentation: https://book.cakephp.org/4/en/controllers/request-response.html#reading-the-http-method https://book.cakephp.org/4/en/controllers/request-response.html#Cake\Http\ServerRequest::is

Bootstrapping a Node.js Lambda function having MySQL support

If you need your Node.js Lambda function to have support for any given extension, add that extension locally to have your local npm download the dependencies into node_modules, then zip the folder into an archive, and create a Lambda function from that archive. You can do it from a Linux VPS, or download the ready-to-use… Continue reading Bootstrapping a Node.js Lambda function having MySQL support