Alternative view: by date.
I noticed a while ago a Perl script file included on my blog wasn’t
served properly, since the charset wasn’t announced and web browsers
didn’t display it properly. The received file was still valid UTF-8
© character), at least!
First, wrong intuition
/etc/apache2/conf.d/charset it looks like the
following directive might help:
but comments there suggest reading the documentation! And indeed that alone
isn’t sufficient since this would only affect
text/html. The above directive would have to be combined with
something like this in
AddType text/plain .pl
To avoid any side effects on other file types, the easiest way forward
seems to avoid setting
AddDefaultCharset and to associate the
UTF-8 charset with
.pl files instead, keeping the
MIME type, with this single directive (again in
AddCharset UTF-8 .pl
Looking at response headers (
wget -d) we’re moving from:
Content-Type: text/x-perl; charset=utf-8
Nothing really interesting, or new. Just a small reminder that tweaking
options too hastily is sometimes a bad idea. In other news, another Perl
script is coming up soon.
While building and testing LiveCDs, QEMU and
VirtualBox can speed up development cycles…
until a bug is encountered:
apt-get update hanging on a
operation. Maybe aufs is at fault? Its
author then asks for some data, including what happens when some SysRq keys are
pressed. What they are is already quite extensively explained in
(Linux sources), but I’d like to point to a nice trick for people using
emulation and virtualization tools (ever tried to send
a virtual machine?):
# echo $letter > /proc/sysrq-trigger
$letter is any of the supported SysRq keys. As an example:
# echo d > /proc/sysrq-trigger # dmesg | tail -1 [558193.423427] SysRq : HELP : loglevel0-8 reBoot Crashdump tErm Full kIll saK showMem Nice powerOff showPc show-all-timers(Q) unRaw Sync showTasks Unmount shoW-blocked-tasks
VirtualBox (available in Debian as
virtualbox-ose with a
m-a-buildable kernel driver:
virtualbox-ose-source), is quite interesting, and works great on
OSE? Open Source Edition.]
Example: X freezes sometimes when
gtk-2.11 is installed, maybe due
to bugs like xfwm4's Debian bug #442053, which is quite
annoying since epiphany's trunk needs it. Then develop in a virtual
machine and restart it when needed, leaving the host system
unaffected. It is also quite easy to duplicate, pause, resume, etc.
the virtual machines.
Note: Virtual machines are stored in
.vdi files (Virtual Disc
Images). Copying them isn't the way to clone images, since a UID is
stored inside them. Use
vboxmanage clone original.vdi clone.vdi
# are available! \o/
A while ago, IP forwarding was being set through
has been deprecated.
It is possible to play a bit with
net.ipv4.conf.default.forwarding=1 # Or 0...
This sets the default forwarding state of network devices without explicit configuration. It only affects the devices that will be registered in the future.
A similar setting is the following:
net.ipv4.conf.all.forwarding=1 # Or 0...
This applies to all the network devices (even those not in the
UP state), but
doesn't apply to the devices that will be registered in the future.
Another setting is the following, which acts as an alias of the previous one:
Then just run
sysctl -p to take this parameter into account.
These settings can also be specified replacing the dots by slashes, and are