Culture

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.