Skip to content

Blog

How to Calculate the Time Between Two Rows in SQL Server

I had an interesting problem to solve: How long did a task take to complete? The challenge was that our task history table contains one row for the start and another one for the end of a task:

Id TaskId Action Timestamp
1 100 Start 2022-08-01 08:00:00.000
2 101 Start 2022-08-02 07:30:00.000
3 100 Stop 2022-08-03 17:00:00.000
4 102 Start 2022-08-04 08:00:00.000
5 102 Stop 2022-08-04 17:00:00.000
6 101 Stop 2022-08-05 18:00:00.000

What to Do if OpenSSL Does Not Find Your Private Key

As we were trying to combine a private key with a certificate into a pkcs12 file, we got this OpenSSL error:

openssl pkcs12 -export -name "Domain" -out Domain.pfx -inkey private.key -in Domain.crt

unable to load private key 11528:error:0909006C:PEM 
routines:get\_name:no start line:crypto\\pem\\pem\_lib.c:745:
Expecting: ANY PRIVATE KEY

Free App Service Managed Certificates in Azure

For the last 3 years we used Let's Encrypt certificates for our user group site. Since there is no direct and easy-to-use solution in Azure, we needed the sjkp plug-in. Unfortunately, that no longer works after we moved from Windows to Linux as the hosting platform and we needed to fall back to a manual process for the renewal of the certificates.

How to Fix 'Headers Already Sent' Error in Urvanov Syntax Highlighter

If you wrote a comment in this blog in the past weeks, you got an error like this one:

Warning: Attempt to read property "comment_ID" on null in /home/*/class-urvanov-syntax-highlighter-plugin.php on line 714 Warning: Attempt to read property "comment_ID" on null in /home/*/class-urvanov-syntax-highlighter-plugin.php on line 724 Warning: Cannot modify header information - headers already sent by (output started at /home/*/class-urvanov-syntax-highlighter-plugin.php:714)...

Add a security.txt to Your Web Applications

Your web application is under the constant thread of hackers. It does not matter if you have a small pet project application on the internet or a big commercial site. As soon as it is accessible from the internet, someone will attack it.

Sometimes we get lucky, and someone finds a security issue and wants to report it. But where should they report it to? The address [email protected] may be processed by someone without any knowledge of IT or security and ignores the report.