How to prevent caching (force image reload) in PHP and/or JavaScript/jQuery

If you are using images generated on-the-fly by a PHP script (or another server language), like I'm doing on my web application, you surely do not want images to be read from cache as your users will be seeing the same first generated image (saved into cache) and not the…

Howto Gentoo Linux with UTF-8 and Portuguese (Portugal) localization

Purpose How to configure a Gentoo Linux system to use UTF-8 character encoding and Portuguese (Portugal) localization (language and keyboard). Background UTF-8 is a variable-length character encoding, which in this instance means that it uses 1 to 4 bytes per symbol. So, the first UTF-8 byte is used for encoding…

Resume wget broken downloads

Problem How to resume a partial file downloaded from wget instead of downloading the same file from the beginning? Solution Use the -c/--continue option of wget From man wget: "Continue getting a partially-downloaded file. This is useful when you want to finish up a download started by a…

Emerge of subversion fails on java-config

The problem I was trying to install dev-util/subversion but emerge failed when java-config was called. The output: Traceback (most recent call last): File "/usr/bin/java-config-2", line 8, in <module> from java_config_2 import __version__ ImportError: No module named java_config_2&…