A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Where you might find Apache files

  • /usr/sbin/apachectl
  • /usr/sbin/httpd
  • /etc/httpd/conf/httpd.conf
  • /var/log/httpd/error_log
  • /etc/httpd/
  • /etc/httpd/modules/

Combinations, permuations and iterations

To generate all combinations or permutations of a fixed list, use Math::Combinatorics

To generate sequential values for a set of slots, e.g. all binary numbers, or the number of 'max_results' for several modules do this:

  1. add one to the first slot
  2. if that takes it over the maximum, set it to zero and add one to the next slot
  3. repeat step 2 until you reach all zeroes
  4. if all zeroes, you are finished.

Upper and lowercase in vi

Select the text you want using visual mode, then type U for uppercase or u for lowercase.

Intermittent bugs

How do you investigate and fix a bug if you can't reproduce it?

Turn a lot of logging on, then check the logs for occurrences of the bug.