Feed on
Posts
Comments

Here’s a little bash script to display the name of all lists in your mailman site and the number of subscribers for each list, just run it in the same directory as your mailman binaries (/usr/lib/mailman/bin on Debian):

1
2
3
4
5
6
#!/bin/bash
LISTS=$((`./list_lists | wc -l` - 1))
LISTS=`./list_lists | tail -n$LISTS | awk '{ print $1 }'`
for i in $LISTS; do
    echo $i `./list_members $i | wc -l`
done

Protip: you can also just copy and paste the lines into your terminal so you don’t have to save it as a script.

In the PlanningAlerts project, we recently added a default page title for those pages we forget to add specific titles to. I added the initial code and Matthew did it properly cleaned it up, here’s the diff:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/app/views/layouts/application.haml b/app/views/layouts/application.haml
index 27d81d9..6b42b26 100644
--- a/app/views/layouts/application.haml
+++ b/app/views/layouts/application.haml
@@ -2,10 +2,7 @@
 %html(xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml")
   %head
     %meta(content="text/html; charset=utf-8" http-equiv="Content-Type")
-    - if @page_title
-      %title PlanningAlerts | #{@page_title}
-    - else
-      %title PlanningAlerts | Email alerts of planning applications near you
+    %title PlanningAlerts | #{@page_title || "Email alerts of planning applications near you"}
     - if @rss
       %link(rel="alternate" type="application/rss+xml" title="RSS" href=@rss)
     = stylesheet_link_tag "memespring", "main", :media => "all"

I thought other people might find this little hack useful for adding default page titles to their HAML templated Ruby on Rails projects.

Subscribing to feeds from Apple’s iCal Server with OS X’s iCal may be a relatively straight-forward affair but working out what CalDAV address to use with Mozilla Sunbird is another story completely.

It took me ages to work out where these magic feed addresses were but once you know, it’s trivial. In iCal, just select the calendar you want to subscribe and select File, Get Info:

Enter your server address and port, eg. http://yourserversaddress:8008/, then put the CalDAV URL in the image above into the Sunbird CalDAV subscription wizard and you’re good to go:

In preparation for the recent OpenAustralia Hackfest – apps4nsw Edition, Matthew asked me to add the Ruby on Rails port of PlanningAlerts to DevLive so that developers could poke around with what was an experimental codebase (it’s now deployed – woohoo!).

Unfortunately I wasn’t able to attend the hackfest as I was busy jumping out of a plane that weekend but I nonetheless managed to get a new release of DevLive ready that includes a development copy of PlanningAlerts.

I’ve added the relevant details to the DevLive page, where you can also find download links for v0.1.0 of the appliance.

If you’re planning to take a look, I think I should alert you (haw haw!) to the fact that the code is moving at a rapid pace and it might be a good idea to pull an updated copy of the code from Github to make sure you’re seeing the latest-and-greatest code.

If you have any problems with this release or any feature requests, leave them as a comment over on the DevLive page.

The packaged Zenoss for Debain will monitor httpd out of the box but does not look for the apache2 process.

To monitor Apache 2.2, you need to add a similar Processes class as httpd has. Navigate to Processes>Apache and then select Add process. Type apache2 as an ID (it’s just a unique identifier) and select OK.

Under the Edit tab, type apache2 for the Name and ^.*\/*apache2 as the RegEx. That should be all you need.

To start monitoring a device, just remodel it manually or wait for a day or so for remodelling to happen on all your devices for Apache 2.2 to start to be monitored.

« Newer Posts - Older Posts »