CampFireManager Workshop

What is CampFireManager?

CampFireManager is a tool to schedule talks at a Conference or Unconference (such as a barcamp). It is written in PHP and uses a MySQL backend to store the data about the event. It optionally can use SMS messaging and Microblogging services (like identi.ca or Twitter) to perform routine tasks on the system.

A modified version (CampFireManager-Lite) of CampFireManager was recently used at OggCamp '10, in combination with tools created by Xibo. Here's a look at what you would have seen if you were there:

CampFireManager-Lite

This is the main timetable. Note, it only shows two talks before "now", the talk on "now" and the next 6 slot's worth of talks. This caused us problems on the Saturday afternoon when we tried to display the timetable for the next day. The only way we could do that was to change the system time on the server.

Screenshot-mozilla_firefox

This is the now and next screen for the main stage, and a screen showing similar information for each of the stages. By default, each screen shows, in turn, the timetable, the "now and next" screen for all stages and then the "now and next" screen for each individual screen. This is entered by the database, but should *really* have been configured at the screen.

Screenshot-mozilla_firefox-1

Administration was performed by organisers. Data was collected on sheets, and then entered into the system. Using an in-built version of the timetable, these were placed into the appropriate slots in the timetable, which then updated all the other screens.

Screenshot-mozilla_firefox-2

This, however, isn't how I originally envisaged CampFireManager. The full version of CampFireManager is designed to operate with minimal administrative overhead from on-site staff.

CampFireManager

Users (as well as support staff and administrators) would log into the website using OpenID. Several common providers are pre-populated and available using icons to select them.

Screenshot-campfiremanager_demo_-_mozilla_firefox-0

On logging in, all users initially see a timetable, with no definitions of rooms, but with the complete timetable for this day. At the top, under the "Slot" times, is a hyperlink showing "New Talk". Clicking on this brings you to a page where you can enter your talk proposal. Clicking on "Go" inserts that talk into your timetable.

(download)
If you wanted to enter some contact details for your talk (so that your peers at the event can reach you), this is done by clicking on "Amend Contact Details", and entering your details. This will retrospectively correct your details on all the talks you're giving.
(download)

By clicking on "Add other access method" - you can add an "authorization code" (which is a 5 character string of case sensitive, non-similarly rendered letters and numbers) to allow you to update your talks, your contact details or the talks you'll be attending from other communication methods - SMS or XMPP being the two primary examples.

However, I realised that I could use this access method logic to allow administrators the ability to grant administrative access to other organisers, or to promote staff to "Support" staff. In the same way you'd enter a 5 character string to give the same rights to your phone as your web access, you could enter a 9 character string (again, non-similarly rendered, case sensitive letters and numbers) to become an administrator or support staff member. Here you see an Administrator's view of the timetable, which adds two extra options at the top box - Provide support to attendees and modify config values.

Screenshot-campfiremanager_demo_-_mozilla_firefox-6
So, let's support an attendee. We enter some details, either their Auth Code (if they know it), or some details about them they entered previously - a blog address, e-mail, some other contact method, or in extreme cases, their name. If we've had to use any form of wildcard in the search (that is, I typed "Jon" into the name box), then we get prompted to confirm it's them, and can give them their unique Auth Code. If they've not registered on the site, then click on Create New Auth Code to create a new user. In either case, we get a page showing "This is <Person Name> with an AuthCode: <Code>". From here we can amend their contact details, propose a new talk on their behalf, or if there's a talk in the future, show their attendance (which, to be fair, here I couldn't do, as I'd not created a talk for them to attend).

(download)

 

Here's the administrative screen, where you see options that have configured the screens and access methods.

Screenshot-campfiremanager_demo_-_mozilla_firefox-13

There's a mobile interface to the site, which is quite similar to the support staff's view of the site, and again it uses OpenID to authenticate. It gives the user access to a slimmed down portal - showing all talks which are yet to occur (allowing the user to show or remove their attendance), just this user's talks yet to occur, and allowing the user to add a new talk and amend their contact details.

(download)
That is all the interactive screens shown, so here's the two most regularly seen, non-interactive screens, both with a scrolling box between the event title and the content saying (in this instance):

Phones: 07 88 24 64 91 8 on the Three Network (with 18% signal)
Event Hashtag: #oc10
Identify with this service by sending
I <your name> [email:your@email.address] [http://your.web.site]
(there are more options for identification by going to the website)
Propose a talk by sending P <Time Slot> <Slots Used> <Talk Title>
Cancel a talk by sending C <Talk Number> <Time Slot> [Reason]
Rename a talk by sending E <Talk Number> <Time Slot> <New Talk Title>
Attend a talk by sending A <Talk Number>
Decline the attendance of a talk by sending R <Talk Number>
Note: You can combine multiple A and R commands in one message.
Statements surrounded with <> are mandatory options, those statements surrounded with [] are optional.
These commands should be sent to your preferred mobile service listed above.

The Timetable:

Screenshot-campfiremanager_demo_-_mozilla_firefox
And the "Direction" screens (like the now and next screens on the CampFireManager-Lite):

Screenshot-campfiremanager_demo_-_mozilla_firefox-12

The above URLs do work, and the system is available for experimentation. The code and ticket tracker (if you want to run your own, local, instance) is at http://code.google.com/p/campfiremanager. Please contact me if you want to get access to my instance of CampFireManager from an administrative or support perspective. Please note, the SMS engine is not running.

Another e-mail to my MP #debill #AndrewGwynneMP

Dear Andrew [Gwynne MP],

I just noticed that, according to both this website:
http://debillitated.heroku.com/ and this one:
http://www.didmympshowupornot.com/ that you were not able to attend
the debate around the Digital Economy Bill.

Given that over 20,000 people are recorded as having written to their
MP, and over 23,000 twitter messages (since the 17th March) were sent
about the subject, and less than 4% of their MPs attended, I'm
slightly worried about whether this bill is being given appropriate
attention.

Will you reassure me that this bill is considered important enough to
your constituents (like me) that you will be asking the house to be
dropped until after the election, when it can receive the proper
scrutiny it deserves, or do you not feel that it's important for your
constituents for you to be involved in the debate around a law which
permits the government to modify copyright without proper debate, and
which also enables "rights holders" to arrange the disconnection of a
whole household from participating on the Internet, where those
"rights holders" allege (and are never required to be proven in court)
file sharing has occurred.

Yours, in hope,

Jon Spriggs

Using the recursive_import.php script for importing photos to the #Horde module Ansel with subdirectories

I have a problem with the excellent Horde module "Ansel" - their photo
display and manipulation application - which I'm
documenting-until-I-fix-it.

If you have a lot of photos and you want to import the lot in one go,
there's a script called recursive_import.php - you'll find this under
/path/to/your/horde/install/ansel/scripts/recursive_import.php and it
takes the following arguments: -d /path/to/directory -u USERNAME -p
PASSWORD

I'd been using it thinking it would handle directory navigation a bit
better than it did, by running it as follows:

php recursive_import.php -d import_dir -u fred -p bloggs

Infact, I needed to do it like this:

php recursive_import.php -d `pwd`/import_dir -u fred -p bloggs

This is because the script navigates up and down the directory
structure as it works out the contents of each directory, instead of
handling the referencing properly. I plan to look at this properly
tomorrow when I've got a day off, but if I don't, or if the patch
doesn't get accepted, at least you know how to fix it now! :)

Use GMail's SMTP gateway using the command line from !Ubuntu without lots of config #tips

I'm writing a few little scripts at the moment, and one of them needed to be able to send an e-mail. I'd not got around to sorting out what my SMTP gateway was from my ISP - but I do tend to use GMail's SMTP gateway for non-essential stuff.

I thought I could easily setup sendmail, but no, that's SCARY stuff, and then I thought of Postfix, but that needs an awful lot of configuration for an TLS based SMTP connection, so I did a bit of digging.

Thanks to this post over at the Ubuntu Forums, I worked out how to get a local port 10025 to run, but PHP kept complaining, so I next looked for a "sendmail replacement", in comes nullmailer.

So, thankfully this is all rather easy.

  • sudo apt-get install openssl xinetd nullmailer
  • sudo tee /usr/bin/gmail-smtp <<EOF >/dev/null#!/bin/sh# Thanks to http://ubuntuforums.org/showthread.php?t=918335 for this install guide/usr/bin/openssl s_client -connect smtp.gmail.com:465 -quiet 2>/dev/nullEOFsudo chmod +x /usr/bin/gmail-smtp
  • sudo tee /etc/xinetd.d/gmail-smtp <<EOF >/dev/null# default: on# description: Gmail SMTP wrapper for clients without SSL support# Thanks to http://ubuntuforums.org/showthread.php?t=918335 for this install guideservice gmail-smtp{    disable         = no    bind            = localhost    port            = 10025    socket_type     = stream    protocol        = tcp    wait            = no    user            = root    server          = /usr/bin/gmail-smtp    type            = unlisted}EOFsudo /etc/init.d/xinetd reload
  • sudo tee /etc/nullmailer/remotes <<EOF >/dev/null127.0.0.1 smtp --port=10025 --user=your@user.tld --pass=Y0urC0mp3xGM@ilP@ssw0rdEOFsudo /etc/init.d/nullmailer reload

Setting all this lot up was pretty easy with these guides. There's no reason why it wouldn't work on any other version of Linux (provided you can install all these packages).

Good luck with your project!

"Digital Economy Bill" = Internet Disconnection Bill

It's very rare that I'll inflict my political views on people by e-mail, however, this has recently come up, and I wanted to make sure that you understand what this newly proposed law could mean to you. It's only relevant to people in the UK, to ex-pats or Armed Forces people, so if you want to forward it on - please do, but please think before you forward, and don't just blanket send it to everyone.

** If you don't want to read all of the below, then I'd encourage you instead to have a look at http://www.dontdisconnect.us/ **

In the Queen's Speech [1] when parliament was opened for the 2009-10 session, the following was said:

"My Government will introduce a Bill to ensure the communications infrastructure is fit for the digital age, supports future economic growth, delivers competitive communications and enhances public service broadcasting."

The bill referred to is the "Digital Economy Bill", which is due to be introduced to Parliament this or next week, and it's caused a lot of fuss with us Technophiles.

Essentially, this bill allows "Rights Holders" (for example, Music Labels, Film Studios and Television Networks) to contact your ISP and insist that they issue you with a formal notice if they *believe* you to be unlawfully sharing their content on the internet. After "a certain threshold" the government has suggested [2] that it would be acceptable to temporarily disconnect you from the Internet. A law similar to this one was recently introduced in France, which insists on disconnection after 3 warnings.

Now, again, this seems fair, if you can't do the "time", don't do the crime... but, how do they actually know it's you? Because of certain technical limitations of the Internet, everyone sharing a single internet connection (for example in a house, at an office or a internet café) will appear to come from the same internet address, and this will cause you problems in this law, because:

If you let someone use your computer to access the Internet, and they unlawfully download some files, then the bill payer will be
blamed.

If you have a Wi-Fi connection which is not properly secured [3], and someone uses that connection to share a file they've downloaded,
again, the bill payer will be blamed.

* How about if your computer gets infected by malicious software (spyware, becomes a member of a botnet, or worse still, is actively hacked) and they use that as an untraceable machine to download their content - again, the bill payer is blamed.

My other worry is that none of this goes in front of a court of law - this all occurs between the ISP and Rights Holders, so if you get disconnected, it will happen without any judicial oversight and the prosecution's burden of proof is never required... someone (usually outside the UK) will accuse you of breaking the law and you will then get disconnected from the Internet. To me, that hardly seems very fair.

There's a petition [4] against this law which is currently available to be signed (provided you live within the UK, you are an ex-pat or are a member of the Armed Forces), and, if you agree that it isn't fair, I would strongly encourage you to write to your MP [5]. If you do decide to write to them, please review the content at the Don't Disconnect Us website [6] and review some of the letters which have already been written [7] [8] as this e-mailing service will remove duplicate e-mails so if you just copy the content it'll never get to your MP.

Thank you for your time. The links I have referred to above, labelled [x] are listed below if you want to read them.

[1] Queen's Speech: http://www.number10.gov.uk/Page21361
[2] Stephen Timms defends the Digital Economy Bill: http://www.guardian.co.uk/media/2009/nov/20/digital-economy-bill-stephen-timms
[3] Ways to secure your WiFi connection: http://www.dontdisconnect.us/secure-your-wireless/
[4] The petition against the Digital Economy Bill: http://petitions.number10.gov.uk/dontdisconnectus/
[5] You can contact your MP via e-mail at this website: http://www.writetothem.com/
[6] Don't Disconnect Us official website: http://www.dontdisconnect.us/
[7] A letter I wrote to my MP: http://jonspriggs.posterous.com/a-letter-to-my-mp-threestrikes
[8] A letter written by someone else to their MP about this law: http://grahambinns.com/blog/2009/11/24/digital-economy-bollocks/

A letter to my MP

Dear Andrew Gwynne,

I'm writing to you, as my MP, to ask for your support, to try to discourage the implementation of the Digital Economy Bill that was introduced recently.

This proposal is very worrying to me, as a Free Culture (Open Source Software and Creative Commons) Contributor and activist. A large part of the distribution of this Free Culture Content is performed over peer to peer networks, such as BitTorrent, and it appears that this law is trying (in part) to discourage the use of peer to peer networks, on the grounds that they may be used to unlawfully transfer files.

I also worry that during discussions of this law between Stephen Timms (Treasury Secretary) and The Guardian newspaper, he suggested that a temporary account suspension from one's ISP would be an acceptable movement without any judicial overview. Given that Finland has recently recognised Internet Access is now such a fundamental part of our day-to-day lives that they are classing it as a Human Right, I worry that this movement could effectively prevent many of your constituents from being active in society.

I've also noticed that many ISPs and most of the policing and intelligence services have stated they disagree with the recommendations of this bill (for a variety of different reasons), I would be grateful if you could support their position and reject this bill in it's current state, if you are able, when it is presented.

Yours sincerely,

Jonathan Spriggs

Locally Monitoring Interfaces on Nokia Firewalls (and - by a link - McAfee Sidewinders) for Failover

I recently wrote a document on http://jon.spriggs.org.uk/blog explaining how to monitor the interface of a McAfee sidewinder to see when it failed over. I don't know why I didn't write it on Posterous, but if you're following me on Posterous, and you think that you might want to know how to use Perl to repeatedly loop over the same command, and show the results with a date stamp underneath it (a bit like the watch command) then you'll find this page really useful. In the mean time, I've also written the same script for the CSH shell, which is used, amongst other places, on Nokia Firewalls.

Introduction

One of our requirements with one of our customers is to perform regular and routine failover tests. As the interface is not responsive to providing information about when service has failed from Primary to Secondary and back again, I re-wrote the script I adjusted for McAfee Sidewinders to run on the SECONDARY NODE to show the interface address of one NIC every 5 seconds. I'll also show how to slightly modify the script with different time delays and interface names. Please note, there may be much better ways of doing this. I needed something in a hurry, and this gave me what I needed. If you've got any better ideas, please drop me a note at jon@spriggs.org.uk or note below how to do it :)

Steps to perform
  1. SSH to the Secondary node.
  2. Check you're not already primary with the command ifconfig eth-s1p1c0 | grep inet this should return one line showing something like inet mtu 1500 1.2.3.4/24 broadcast 1.2.3.255
  3. Type this
    while (-e /bin/csh)
    ifconfig eth-s1p1c0 | grep inet
    date
    sleep 5
    end
  4. Perform your action to provoke fail-over, which may be to unplug an interface attached to the primary firewall, reboot the firewall or unplug a switch directly attached to the firewall. In response (and after approx 1 minute, based on your HA configuration) you should now see in the script's output, it now shows two lines (or maybe three) - as follows:

    inet mtu 1500
    inet 1.2.3.4/24 broadcast 1.2.3.255
    inet 1.2.3.5/24 broadcast 1.2.3.255
    vrrpmac 0:0:aa:bb:cc:dd
  5. Perform your failback and after 1 minute or so, it should revert to just the single line - 1.2.3.4 or equivelent for your network.
Tweaks

In the bold section above, replace the interface name identified (here it's eth-s1p1c0) with an interface you know will fail over, you can also make bigger or smaller the sleep command - here it's 5 seconds, but there's probably no reason why it couldn't be 1 or 10.