Thursday, December 24, 2020

Remove unknown locale qaa-Latn from windows

Got a fresh window 10 installation where I configure US keyboard as default and added Greek as well (the language with π and Σ symbols). I noticed that when I was switching languages a 3rd locale (qaa-Latn) appeared in the list which I couldn't remove from the windows list. In my case the keyboard was emitting Greek characters but the windows spelling couldn't recognize the words. In order to remove the extra locale I had to use the following powershell.

Sunday, September 20, 2020

Set proxy for command line in windows

 Ever wanted to force tools like curl and az cli to pass their traffic through a proxy while running them in cmd.exe?

Set the following environment variables and netsh will automatically pick up them and use them for all network connectivity.

Tuesday, February 18, 2020

Download new chromium based edge via powershell

If you ever need to download the stable version of the chromium based Edge via powershell, you can use the following one liner:


# Stable
# Invoke-WebRequest -Uri "https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?ProductreleaseID=Edge&platform=Default&version=Edge&source=EdgeStablePage&Channel=Stable&language=en" -OutFile "EdgeSetup.exe"
# Dev
Invoke-WebRequest -Uri "https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?ProductreleaseID=Edge&platform=Default&version=Edge&source=EdgeStablePage&Channel=Dev&language=en" -OutFile "EdgeSetup.exe"

Monday, November 11, 2019

Fixing an old Wordpress plugin to run on PHP 7

You should always update your CMS engine and individual plugins. Unfortunately this is not always possible especially when you have a non actively maintained website and you've used commercial theme or plugins.

In my case, I had to deal with an old Wordpress site which was updated but was still running on an older PHP version 5.6.40. Changing the PHP version  on the server to 7.3, the site broke with a sneaky Call to undefined function mysql_error() on the frontend and [] operator not supported for strings on the admin area. Both errors were caused from a plugin installed by the theme which doesn't support auto updates. More specifically Revslider 4.6.0 which looks like it was used by various themes in the past.
I had no other option but to try and fix them manually since I couldn't downgrade to older PHP version anymore nor invest more resource to change/update the theme and plugins.

Thursday, April 5, 2018

Exchange view DSN mail contents from queue

We had some DSN mails queueing up on our Exchange server's outgoing queue with error 450 4.7.1 and i was trying to figure out what were those mails in the first place. The Subject in all those mails looked like spam and since the From Address was empty, it got me kinda worried and curius at the same time. Using Queue Viewer wasn't helpfull since I couldn't see the origin of the DSN message. I had to use Exchange Management Shell to find out more info.

In order to view the email contents so that you can check the body and find out more information about the cause/source of the DSN, you need to know the message Identity, suspend the message's from processing and then export it.

Tuesday, July 25, 2017

DNN site's search issue with index outside bounds of array

I had an issue with a DotNetNuke 7.4 site's DB size. It had grown way too big and we found out about it because of the server's warnings about low disk..
Both Exceptions and EventLog tables had three new logs (General Exception, Scheduler Event Failure, Scheduler Exception) every 30 seconds saying that the "Index was outside the bounds of the array."

Saturday, February 13, 2016

Recover records after accidental cascade delete

Cascade delete in an sql table relation may sometime lead to serious data losses. Should this occur, you can make use of the log file (LDF) to review the DELETE statements that took place and hopefully manage to recover your lost data.