Rounding a Datetime Value in MySQL to the Nearest Minute

When you store timestamps in MySQL, the values often include seconds even when your report, dashboard, or grouping logic only needs minute-level precision. Rounding a DATETIME value to the nearest minute is useful for analytics, event logs, scheduling screens, and any query where 2026-07-10 09:14:29 and 2026-07-10 09:14:31 should not be treated the same way. … Read full guide: Rounding a Datetime Value in MySQL to the Nearest Minute

Temporarily Redirect stdout and stderr in Python

When you run a Python script from the terminal, most normal output goes to stdout, while warnings and errors usually go to stderr. Keeping those streams separate is useful, but sometimes you want to temporarily capture both of them: maybe you are testing a noisy function, saving diagnostic output to a file, or wrapping a … Read full guide: Temporarily Redirect stdout and stderr in Python

How to keep docker daemon (service) to run without stopping unexpectedly

TL;DR I added a cronjob to check if the docker daemon is running or not -> if not then restart the service. It works like a champ and I never met the issue again. * * * * * docker info > /dev/null || systemctl restart docker Please note that the cronjob should belong to … Read full guide: How to keep docker daemon (service) to run without stopping unexpectedly

Fix libwacom9 dependency issue when upgrade Debian

The following packages have unmet dependencies: libwacom9 : Depends: libwacom-common (= 2.1.0-2) but 1.12-1 is to be installed This should fix the issue on most cases: # apt install libwacom9 libwacom-common=2.1.0-2 If the command above returns error: E: Version ‘2.1.0-2’ for ‘libwacom-common’ was not found Try this: # apt remove libwacom2 When run the command … Read full guide: Fix libwacom9 dependency issue when upgrade Debian

Node.js – Convert PDF base64 to PNG base64 on Lambda

I recently developed an application running on Lambda Node.js 14.x, lost lots of time on this part. So I think this post may help someone to save their time. Don’t hesitate to leave a comment below if you found this post is hard to understand or if you have any questions. 1. NPM package I … Read full guide: Node.js – Convert PDF base64 to PNG base64 on Lambda

How to get Salesforce Sfdx Auth Url

1. Install SFDX Refs: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm The easiest way is to install via npm: npm install sfdx-cli –global To check if the sfdx is installed or not: sfdx –version 2. Authorize an org with the OAuth 2.0 webserver In this step, you will need to login via a web browser to authorize the CLI application. sfdx … Read full guide: How to get Salesforce Sfdx Auth Url