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.

Saturday, October 17, 2015

Move Azure blobs between containers

I finally got some time to tidy up my Azure account. The first thing I wanted to do was to bring all my vms in a single storage, gathering them from various subscriptions. In order to do that I had to copy the vhds (located in the vhds container of each storage account) to their final destination.

Tuesday, September 15, 2015

Cancel/Stop DiskPart full disk format

Using DiskPart to clean up hard disk partitions and MBR is fast and easy but you can accidentally invoke a full format which can take a while to finish. In that case, instinctively you would press Ctrl+C only to find that you've just killed DiskPart instead of stopping the format process.
Googling around, people suggest to kill the process using task manager (which you can't) or reboot your system. There is yet an other option, which worked for me, and no one mentioned (at least on the sites I checked).

Wednesday, September 9, 2015

Converting/Exporting mixed encoding MySQL data to UTF8

I had to move an old MySQL database storing the info of a Greek website, and guess what; the default schema collation was latin1_swedish_ci and the charset latin1, the defaults of MySQL instance (which no one changes during installation) :/
The schema contained a mixture of tables, some of them in latin1_swedish_ci collation and some other with the proper UTF8 settings. Trying to export the data from either MySQL Workbench, phpMyAdmin and host's panel I was getting an ANSI encoded sql file. Normally, that's fine but if your data contains UTF8 characters (i.e. Greek letters) then you've got a problem.

Friday, July 3, 2015

Homemade certificates for the web developers

Working with the web, you will definitely end up having to generate a trusted certificate at least for your localhost. In my case, I have been working with certificates a bit more and the need of a personal CA was obviously the best solution. Moreover, I wanted to modify Fiddler's CA name to avoid having the ugly "DO_NOT_TRUST_FiddlerRoot". This post describes how I automated the certificate generation process and also mitigated the Firefox's warning about the old SHA1 hashing.

Wednesday, April 1, 2015

Set / clear windows proxy via command line

It is a very common task to set and clear the proxy setting depending on the client's network configuration. I was frustrated going through Tools-->Internet options-->Connections tab-->LAN settings and configuring the proxy settings so I ended up having a couple of batch scripts that set the client's proxy and one to reset the settings when I am in a more relaxed environment where traffic passes through the normal gateway... Note that I have created shortcuts and set them to "Run as administrator" as the following commands require elevation.

Thursday, June 26, 2014

Toshiba AuthenTec duplicate fingerprints

If you have a Toshiba with AuthenTec biometric device and you forgot to clear the fingerprints before formatting your windows 8.1 installation, you will face the issue of not being able to register the same fingers in your newly created Microsoft Account. The issue steams from the buggy implementation of the Toshiba Fingerprint Utility that doesn't handle domain accounts that well. Moreover, the fingerprint biometric data are stored inside the hardware, so no matter what file you delete, you won't be able to fix this. Some people on the net report that a simple export and import of the data (using the utility as administrator) worked for them. All the reports were mentioning windows 7 so I guess they were all facing an issue with local accounts and not domain ones.
Luckily, Toshiba discovered the issue and offers a command line tool to delete all fingerprint data from the hardware. The name of this tool is TFPU WBF Delete Fingerprint Tool (a.k.a. tc30636900b.exe) and this made the trick for me.