Run PHP script every 10 minutes with Crontab

Do you need to run a PHP script every 10 minutes with crontab? Here is an example line you can add to /etc/crontab: # Run this PHP script every 10 minutes */10 * * * * user cd /var/sites/website.com/htdocs; php -f script.php >/dev/null 2>&1 &# Run this PHP script every 10 minutes */10 * * […]

Move MySQL Database with /etc/mysql/debian.cnf

When you move MySQL databases from datadir /var/lib/mysql/ to another server, remember to also copy the file /etc/mysql/debian.cnf to the new server, it contains the password used to connect to MySQL server via command-line. Very important if you use automated backups. Just a quick tutorial to move a MySQL database: 1) Stop MySQL server: /etc/init.d/mysql […]

Delphi Scrollbox with Black Background on Windows XP

Problem: Delphi Scrollbox is completely black on Windows XP. Some Win XP users may experience strange behaviors with Scrollbar\Scrollbox. In particular they may see the background in black, example: To fix this issue just set ParentBackground to True on the Scroll component. If that still doesn’t work, try to put the Scrollbox inside a TPanel. […]

Simulate Multiple Monitors in VMWare guest

You can have one large host window with multiple monitors in the guest: 1) Power off the VM then go to VM > Settings > Hardware > Display 2) Select “Specify monitor settings”, and set “Number of monitors” to 2 or more. 3) Uncheck Autofit Guest by going to Edit > Preferences > Display. * […]

Delphi poScreenCenter and Dual Monitors

To correctly show your main form on dual monitors use poScreenCenter: So the main form is displayed on the center of the main monitor. Else the main form is displayed in the middle between the two monitors. More information on this link: Vcl.Forms.TPosition – RAD Studio API Documentation

CVE-2017-5754 Patch Meltdown Vulnerability on Debian Linux

How can I patch Meltdown vulnerability CVE-2017-5754 on Debian Linux server? First, follow the status of the Debian vulnerablities on this link: Information on Debian source package linux The Meltdown bugs are CVE-2017-5753, CVE-2017-5754, CVE-2017-5715: The fixes for all the Meltdown CVEs vulnerabilities are not yet available (9 Jan 2018). But soon they will be […]

Check Linux for Spectre and Meltdown vulnerability

Check if your Linux server is vulnerable to Spectre and Meltdown CPU bugs. You can use Spectre & Meltdown vulnerability/mitigation checker for Linux: https://github.com/speed47/spectre-meltdown-checker The shell script checks for CVE-2017-5753, CVE-2017-5754, CVE-2017-5715. Read also: How to patch Meltdown vulnerability on Debian Linux Download the shell script using wget: cd /tmp/ wget https://raw.githubusercontent.com/speed47/spectre-meltdown-checker/master/spectre-meltdown-checker.shcd /tmp/ wget https://raw.githubusercontent.com/speed47/spectre-meltdown-checker/master/spectre-meltdown-checker.sh […]

Display hidden files in WinSCP

Open WinSCP and click on Options -> Preferences. Then on the left click on Panels and enable “Show hidden files”:

Replace characters on filenames of all files in a folder (Windows)

First run PowerShell and set the current directoy to the folder where are the files: cd C:\path\to\foldercd C:\path\to\folder To replace a certain character on filenames of all files in a folder, type: Get-ChildItem -name | ForEach-Object { Move-Item $_ $_.replace(" ", "_") }Get-ChildItem -name | ForEach-Object { Move-Item $_ $_.replace(" ", "_") } The above […]