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.