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: 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 /tmp/ wget […]

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 […]

Rotate Nginx vHosts Log Files Every 1 Year

Set logrotate to keep 1 year (365 days) of log files: sed -i ‘s/rotate 52/rotate 365/’ /etc/logrotate.d/nginxsed -i ‘s/rotate 52/rotate 365/’ /etc/logrotate.d/nginx