I heard the television show with Sheldon in it (I forget what it’s called, oh yeah, that’s right, Big Band Theory) on in the background and got to thinking about the cultural background of the main (male) characters: an ‘American’, an ‘Indian’ and two ‘Jews’.

Then I got to thinking about culture and for some reason particularly what I thought of Jewish culture. Basically they seem to me to value intelligence and seek wisdom; and I think that’s respectable.

Then I decided I’m hardly in a position to have an opinion because I have next to no experience in the matter being a relatively unworldly and untraveled individual, and that at any rate in general I cared about culture just about as much as I care about superstition.

Mailman check_perms

I learned about the Mailman check_perms program today. Basically it reports on permission issues with the mailman database, which is good because I was having trouble with the permissions on the mailman database. Basically email for a new list wasn’t being added to the web archive because the right permissions weren’t in place to allow the mailman process to write there. Anyway, with the help of /usr/lib/mailman/bin/check_perms and the judicious use of “chgrp -h list” and “chown -R -h www-data:list” I think I managed to fix everything up.

Update: I had a problem after applying the above changes whereby I couldn’t access the web archive for Mailman lists anymore. But… I figured out how to fix it. Basically I added the www-data to the list group with the following command (and then rebooted):

 sudo adduser www-data list

Mailman 3.0 and Postfix Virtual Domains

Read the spec for Mailman 3.0. Looks like it will be pretty good. The feature that I’m interested in, and I’m annoyed I can’t do this with my current version of Mailman, is to be able to put a link to the web archived message in the bottom of the outgoing SMTP message. I.e. so there’s a link back to that message on the web in the message itself. Would be really handy for referencing. At the moment if I want a link I have to go to the web archive for the particular list and find it.

While I was reading the Mailman 3.0 spec I noticed a link to Postfix Virtual Domain Hosting Howto. I think I might have read (at least some of) that before. But… reading that is now definitely on my TODO list.

Using gzip, or bzip2, or..?

Wanted to know a little more about the pros and cons of different compression tools and strategies.

Found this article A Quick Benchmark: Gzip vs. Bzip2 vs. LZMA and looking at that gzip is a pretty clear winner I think wrt my concerns (i.e. fast compression over high compression). Also found gzip vs. bzip2 which concluded basically the same.

Removing colour code special characters with sed

I want to post-process the output of an ‘ls’ command with ‘sed’ so that I can remove the ‘./’ prefixes that I can’t avoid going into the ls output (this is a result of using ‘find’ safely).

The thing is, if I pipe ls output to sed, then the default –color=auto setting applies and ls detects that it’s not talking to a terminal so doesn’t output colour codes. But I want colour codes, usually, so I need to change the ls command to use –colour=always, which I’ve done. This means I can have colour and also have sed format the ls output.

The problem is then what happens if I want to pipe my output to ‘less’? Then the colour code commands appear as garbage in the output stream. So, usually I want colour codes, and sometimes I don’t.

I found this article, Remove color codes (special characters) with sed, which helped me come up with the following bash alias:

 alias noco='sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"'

So now that I have the ‘noco’ alias (short for “no colour”) I can pipe my output through that if I want the colour codes removed, which I can apply before piping output to less.

It’s a little bit annoying that I have to do things this way but I haven’t been able to think of a better way to make it all work and this all seems to get the job done.

Math support in MediaWiki

I’ve been through this process before (for older versions of MediaWiki than the 1.18 version I’m using at the moment, and things have changed) but yesterday I found myself following instructions for enabling support for mathematical equations in MediaWiki. So that’s up-to-date on my Morpheus (private) and Sixsigma (public at wikis (which are based on my jjwiki project). At the moment I have four wiki projects: bkwiki and bkdevwiki for Blackbrick, pcwiki for ProgClub and jjwiki for I also have another wiki project that’s not presently under version control called BBS for Blackbrick. I think I’ll roll the bkwiki, bkdevwiki and BBS projects into a single project (bkwiki), and the pcwiki and jjwiki projects into a single project (jjwiki) so that I only have two MediaWiki projects to maintain (for now). But, as usual, making things simpler demands more work… not sure when I’ll get around to that.

phpMyAdmin QueryHistoryDB

The SQL History feature of my phpMyAdmin setup wasn’t working, the history table had been configured correctly as ‘pma_history’ but there was no data being written into that table when I ran queries and the SQL History tab of the query window just showed a blank.

Eventually I figured out that in order for the pma_history table to be populated I needed to set the QueryHistoryDB setting to true. So I did that and now SQL History is working!

Starting a PuTTY session from the command-line

I think I’ve probably done this before (the links in my browser were marked as visited), but today I wanted to create a desktop/toolbar shortcut icon (with shortcut key) to a saved PuTTY session called “peace tunnel”. The “peace tunnel” opens an SSH session to a development server called “peace” and automatically configures a tunnel from port 80 on the localhost to port 80 on the server, so I can check on the progress of a web application under development.

Anyway, I found the documentation for Starting a session from the command line and basically to load my saved session called “peace tunnel” I had to run the command:

 putty.exe -load "peace tunnel"

Too easy.

HTTPS+SSLVerifyClient require in <Directory>+big POST = Apache error

I was configuring MediaWiki to allow uploads and was getting an error in the browser about the POST data being too large (“does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.”). I had a look in the Apache error log and found:

[Thu Feb 23 16:12:45 2012] [error] [client] request body exceeds m
aximum size (131072) for SSL buffer, referer:
[Thu Feb 23 16:12:45 2012] [error] [client] could not buffer messa
ge body to allow SSL renegotiation to proceed, referer:

So I did some research. I found this document, File upload size which suggested editing /etc/php5/apache2/php.ini which I did:

upload_max_filesize = 20M
post_max_size = 80M

That didn’t fix the problem though. I found Request entity too large which suggested checking my setting for LimitRequestBody, but that wasn’t the problem either.

Eventually I found Bug 491763 – HTTPS+SSLVerifyClient require in <Directory>+big POST = Apache error which suggested I needed to apply the SSLRenegBufferSize directive which I did like this:

  <Location /morpheus>
    SSLVerifyClient require
    SSLVerifyDepth 1
    SSLRenegBufferSize 20971520

And then after restarting Apache the problem was solved.