You are here

Tip

ACDSee: Changing the background colour of a transparent PNG/GIF image

Rather than use images with transparencies, it is often preferable to replace transparent pixels with a suitable background colour.

In ACDSee 4, the background colour of transparent PNG files (or any other image file that supports transparency) is by default set to black. There is no immediately apparent option whereby you can change this colour and then save the file as a JPG or similar. After some asking around, I was told that while it is possible to customise this colour, it's a bit of a pain. Here's how:

Windows 7: Changing the location of system temporary files and browser caches

My windows machine is running off a bum drive and seeing as to how HDD prices are temporarily ridiculously high at the moment, I've decided to attempt a few workarounds to see if I can continue to use this erratically faulty drive for a couple of more months. The issue with the drive is in itself unknown. It just locks up suddenly with the HDD LED continuously on. Windows continues to be active for a while, but not terribly responsive. Sometimes, the issue sorts itself out after a while. Other times, the system reboots.

Force a git merge "theirs" (even though it doesn't exist)

A note to myself on how to force-sync my really outdated master branch with an active branch. This is taken from this excellent post:

git checkout -b tmp origin/upstream
git merge -s ours downstream
git checkout downstream
git merge tmp
git branch -D tmp

where upstream is the branch whose commits we want and downstream is the branch we want to merge into.

Resetting PuTTY / Terminal after viewing a binary file

If you've been working with Linux terminals for a while, you've invariably found that viewing a binary file tends to output a lot of hieroglyphic nonsense (when all you want to do is check its header) and for some petty collateral damage, rapes your screen by changing your command prompt and window title to more of the same gibberish. While a lot of people (*raises hand*) simply accept such rowdy behaviour as one of the vagaries of life and simple open a new terminal window or similar, this - as I found out a few minutes ago - can be fixed.

locate error message: mlocate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory

On an Ubuntu box, I tried using the locate command to find information about a package and ran into the following error:

Drupal: Error: Class 'SelectQueryExtender' not found in includes/pager.inc

If you find that you Drupal installation is WSOD-dead with the following error message:
Error: Class 'SelectQueryExtender' not found in includes/pager.inc

sed: Deleting all lines between two types of lines

Today, I made quite an impression on my furniture thanks to incessant contact between it and my illustrious head. This, as usual, was due to my looking for a clean regex to solve my issue while working with text files in Vim. My task was, I initially believed, quite simple: delete all the lines that are sandwiched between two types/patterns of lines. In this case, the top slice of the sandwich consisted of a line which was entirely a number and the bottom slice was a line entirely populated with underscores.

Resolving merge conflicts fixed manually in Eclipse/eGit

I'm using Eclipse (Indigo) and eGit, its Git plugin. Earlier today, when I merged the contents of one branch with my master, I ran into a bunch of conflicts. While I suspect that I should have used the "Team > Merge Tool" to resolve them, as they were rudimentary in nature, I just sorted them out manually. However, eGit did not notice that the conflicts (and their in-file markers) were gone and retained the conflicted icon for each of the affected files.

KDE network manager disabled

One of my laptops which is running on Kubuntu Lucid decided to stop connecting to my network today. I found that the KDE network-manager applet (or is it a plasmoid? :S) had decided to disable itself. Clicking it stated so with no option to re-enable it (nice UI, boys). Getting to the commandline and starting the network-manager service did not help. I also found that accessing the System settings networking configuration gave me corrupt XML file errors.

Missing Excel/XLS/XLSX spreadsheet import in PHPMyAdmin

If you find that the really handy Excel spreadsheet import feature for MySQL is missing in PHPMyAdmin, it's because it has been removed. According to the PHPMyAdmin changelog:

3.4.5.0 (2011-09-14)
- [core] Remove library PHPExcel, due to license issues
- [export] Remove native Excel export modules (xls and xlsx formats)
- [import] Remove native Excel import modules (xls and xlsx formats)

Pages

Subscribe to RSS - Tip