Archive for the ‘Administration’ Category

Programming (monospace) fonts comparison chart

Wednesday, May 18th, 2016

I’ve been searching the web for different programming fonts since the beginning of times it seems, so I can tell you that this website has gathered most of them: http://www.s9w.io/font_compare/. There are some I have in my collection which are missing, but the authors seem to update their website with new tips, and provide a very useful preview mechanism.

Also here are some useful links to downloading those fonts: http://programmingfonts.org/list

Actually, that last website has it’s own web app for directly testing those fonts: http://app.programmingfonts.org/

Changing size of VirtualBox disks before and after deleting snapshots

Sunday, January 6th, 2013

If you search for guides for changing the size of VirtualBox .vdi disks, there are plenty, and really the solution is pretty simple, just

vboxmanage.exe modifyhd "<path-to-vdi>" --resize <newsize-in-MB>

But what some of the guides fail to mention (some of them don’t fail to mention it, but since you are reading this post you probably failed to see it in the guides that did mention it) is that you really should delete all the snapshots for the disks you are trying to change the size of, BEFORE changing the size. Otherwise you’ll pretty quickly notice that the guest OS doesn’t recognize the drive size change, and now you can’t delete the last snapshot, getting instead the error with something about “virtualbox could not merge the medium VERR_INVALID_PARAMETER”.

So this post is really for you that are now stuck with a virtual machine that has a disk that cannot be size-changed and a snapshot that cannot be deleted.

Basically the solution is to clone the whole virtual machine using the standard virtualbox functions, because the cloned version will be free of any snapshots and still represent the current state of the original VM.

When you are going to clone it you will be presented with some options which are self-explanatory. But one of those options will have you choose to keep or discard all the snapshots, and you obviously have to choose discard at that point.

One small drawback of this operation is that VirtualBox does not seem to let me choose where to put the disk of the cloned machine and creates it in the default location, which can be problematic if you keep your disks somewhere else.

Now you will still have to resize the new disk. This is where another small problem arises: if you just use the command line fromt he beginning of the post on the newly created disk, you may receive the error “VBoxManage.exe: error: Cannot register the hard disk … becase a hard disk …. with UUID … already exists”. Long story short, the solution is to first run

vboxmanage.exe internalcommands sethduuid "path-to-the-new-disk"

It will assign a new uuid to the disk which will solve the problem, and you can now resize the disk with your normal command (the modifyhd one, from the beginning of the post).

Now just boot into the guest and use Gparted (if you have *nix) or Computer Management -> Storage -> Disk Management in Windows 7 (probably Vista had this already) to make the guest OS understand the new disk change.

Of course, now would be also a good time to make sure the guest OS works properly and delete the original VM in VirtualBox gui to save space.

Remember to backup :)

Monday, August 20th, 2012

Ninite: aptitude install for windows

Thursday, March 15th, 2012

While there are arguably both advantages and disadvantages with the debian package system (or any linux package system for that matter), it is certainly usefull to be able to “aptitude install whatever” by basically only having to know the name of the program you wish to install.

I don’t think that windows will ever have quite as big library of automatically installed programs, but Ninite certainly does create that feeling, as it is one of most successful and user-friendly attempts to do automatic installing in Windows.

It is an automatic and customizable installer of mostly used programs for windows. After configuration, it will automatically download latest versions of the software such as Skype, Open Office, Mozilla software, other browsers, messengers and such and such, automatically click away all adware/toolbars. It is mostly useful on new installations, but it can also keep your usual software up to date. It is of course completely free, definitely worth a try if you haven’t already!

Windows 7 aero lag fix

Friday, October 8th, 2010

Windows 7 is great, but on my machine every once in a while, like after a couple of hours of working, the interface starts to lag. Nothing big, probably just 100 milliseconds or something, but it is noticeable, and especially when watching movies. Don’t really know what it is exactly, maybe something with drivers or some program that slows it down, but there are numerous reports of this out there on the internet. And this thing is really annoying, because once it has started, EVERYTHING is lagging, all the windows and everything that happens on the screen.

This has nothing to do with too little memory or some process running in background. The lag would appear even when processor usage was on 0-5 percent.

So, basically, the workaround for this: once it starts to lag, switch a window with Windows+Tab button. (To open that 3D taskswitcher that came in Vista). Once you have done that, the lag is gone.

It is sure strange, seems like there is some bug that starts when something gets overrun, and the 3D task switcher resets it to make everything run normally again.

This isn’t really a fix, just a workaround, but searching the internets gave me nothing, and this solution is still viable. So here you go people, if somebody stumbles across this article with the same lag problem, there you have a solution.

Reliably importing huge mysql databases.

Thursday, August 5th, 2010

Every normal php web-developer will once in a while encounter a task of moving around mysql databases, or even individual tables. And if that database will be somewhat big, once again, the developer will have to deal with resource limitation problems like php execution time, memory, upload file size, and so on.

Luckily, there is a perfect solution: a php script that will import an .sql file of any size to a database, iterationally, thus automatically overcoming all of the resource limitation problems. Basically it runs itself many times, importing small portions of the file at a time, and you don’t even have to worry about that, just supply the database login info to the script, upload the .sql file to the server (by ftp for example), and press Import.
Plain and simple:
http://www.ozerov.de/bigdump.php

PS. Just remember: when you are exporting your files from the source database, uncheck the ”Extended inserts” option (in phpmyadmin or other tool), otherwise bigdump will not understand your file.