Fix error when install npm package as global package

Today, I will guide you to fix error when install npm package as global package. I ran below command to install npm package as global package but installation was failed. Command: sudo npm install -g electron Error will look like: Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/electron/.electron’ npm ERR! code ELIFECYCLE npm ERR! errno 1 npm… Read More Fix error when install npm package as global package

Keep database connection on connecting to MySQL/MariaDB using SQLAlchemy

You want the database connection will be keep on connect to MySQL/MariaDB, just use pool_recycle parameter in method create_engine(). Example: create_engine(db_url, pool_recycle=1) pool_recycle this setting causes the pool to recycle connections after the given number of seconds has passed. It defaults to -1, or no timeout. For example, setting to 3600 means connections will be… Read More Keep database connection on connecting to MySQL/MariaDB using SQLAlchemy

Note for awk command on Mac

Today, I cleaned up redundant Docker images. I used this command line: docker rmi $(docker images | grep “^<none>” | awk “{print $3}”) But it does not works on macOS, only Linux. After some hours, I found the problem, and the right command for macOS is: docker rmi $(docker images | grep “^<none>” | awk… Read More Note for awk command on Mac