Inklings: a tumblelog

Mounting a Nexus 7 on Ubuntu 12.04

The word “annoying” springs to mind.

Probability and Statistics Cookbook

The cookbook contains a succinct representation of various topics in probability theory and statistics. It provides a comprehensive reference reduced to the mathematical essence, rather than aiming for elaborate explanations.

Sphere Online Judge

A site not unlike Project Euler, but with automated test runners for a large number of languages.

Using mod_rewrite to pass REMOTE_USER on to mod_proxy in Apache

This was wrecking my head horribly earlier because I kept hitting the limit imposed by LimitInternalRecursion without realising why. It turns out that I was missing the following:

RewriteCond %{IS_SUBREQ} ^false$

That ensures that the rewriting to copy the value of the REMOTE_USER environment variable is done once and once only. Here’s the full ruleset:

RequestHeader Unset X-Forwarded-User
RewriteEngine On
RewriteCond %{IS_SUBREQ} ^false$
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule .* - [E=RU:%1]
RequestHeader Set X-Forwarded-User %{RU}e env=RU

With luck, this’ll save somebody else from wasting their time like I ended up doing.