Mozilla repositories for Ubuntu

Firefox x64, Flash, Illegal instruction

If the 64-bit version of Firefox (here 3.5.7) dies with an "Illegal instruction" error (start Firefox from a terminal and check the output there) when visiting websites with Flash content, have a look at http://ubuntuforums.org/showthread.php?t=1263905. I couldn’t download the fix from within the forum, but it is also available from http://net.multi24.com/patches/flashplugin-lahf-fix.tar.gz/view.

Mount an SSH resource

The following requires sshfs which is preinstalled in Crunchbang 9.04 and thereby probably in Ubuntu, too.<pre lang="text">$ mkdir ~/tmp/website$ sshfs user@website.com:/ ~/tmp/website/</pre>

Additional links:

Own modules for Sage

Document (pre)processors and LaTeX

The following is a non-exhaustive list of tools that can be used as or combined into a preprocessors to finally generate LaTeX documents. My idea of “preprocessing” here includes converting markuped (reStructuredText, Markdown, MediaWiki, …) documents to LaTeX, custom markup extensions and Unicode character support.

I also include links to resources that look helpful w.r.t working with or extending the itemised tools.

Since I wanted to work with and thereby learn a contemporary scripting/dynamic language, I focused on tools written in Python and Ruby. The list nevertheless also contains tools written in other languages.

Resize partitions

A detailed description of how to resize ext3 partitions on Linux can be found at http://www.howtoforge.com/linux_resizing_ext3_partitions.

An easier way is to just boot Knoppix and run GParted, e.g. from a shell.

Crunchbang, maintenance console, Grub

My Crunchbang Linux complained about not being able to run “`fsck`” in some automated mode and therefore asked me to enter the root password in the maintenance console. Unfortunately, my usual (i.e. “`sudo`”) root password was not accepted, so I wasn’t able to run “`fsck`” manually.

Here is what I did instead:

- boot and enter Grub
- press “`e`” for edit kernel line
- add “`init=/bin/bash`” to the end of the line, e.g. “`kernel/boot/vmlinuz root=dev/hda6 ro init=/bin/bash`”
- press “`b`” for boot
- ind the correct terminal with the root user already being logged in (with ALT-F#, #=1,…,12)
- run “`fsck`”

That’s it.

Find a function’s minimum with Mathematica

In a probability scenario with two possible results per turn (with probabilities p, q = 1 - p) the expected value had to be minimised. This is done in Mathematica with FindMinimum[{f, constraints}, {x, y, ...}], and in my case:

FindMinimum[
   {2 p*q + 3 (p^3 + 2 p^2 q + q^2 p + q^3) + 4 (q^2 p^2 + q^3 p), q == 1 - p},
   {p, q}
]