[etc] archive category

MV Sun Sea in Esquimalt

The migrant/refugee vessel MV Sun Sea arrived in Esquimalt Harbour on Friday.

Tags: , ,

Shock the monkey!

Some important research from the Institute of Biomedical Engineering, National Taiwan University, Taipei, Taiwan. Drs. Tsai, Chang, Liu, Kuo, Chen, Jaw, & Hsieh (whew…seven researchers) published a study of the electrical properties of the Ding-Dong. No, not that Ding-Dong, the other ding-dong.

Anyway, you can read the shocking news on Disco blog or the abstract on PubMed. This is going to win them seven awards.

USCYBERCOM: 9ec4c12949a4f31474f299058ce2b22a in Python

In Wired, Noah Shachtman pointed out that the US Cyber Command logo has a 32-character code inscribed onto its inner gold ring. It is well-known that MD5 produces 128-bit message digests (often represented as 32-character hexadecimal digests) so it surprised few that the code turned out to be an MD5 hash of the organization’s mission statement.

To recreate this hash in Python, type the following into your Python interpreter:

Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27) 
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from hashlib import md5
>>> ms = "USCYBERCOM plans, coordinates, integrates, synchronizes and conducts activities to: direct the operations and defense of specified Department of Defense information networks and; prepare to, and when directed, conduct full spectrum military cyberspace operations in order to enable actions in all domains, ensure US/Allied freedom of action in cyberspace and deny the same to our adversaries."
>>> o = md5(ms).hexdigest()
>>> print o
>>> len(o)

Note: The library ‘hashlib’ was added in Python 2.5.

Tags: , , , , ,

Funniest release notes ever? Thank Chaos Tools for Drupal

From the Chaos Tools release notes for version 1.6 for Drupal 6:

The 1.5 release was botched: only some of the changes listed on the release notes were actually included. This release (1.6) includes all changes that were supposed to be in 1.5.

See for yourself and feel your confidence in the codebase rise with each word.

Tags: , , , ,

Installing Webmin on Ubuntu Server 10.04 LTS (Lucid)

Webmin installed on Ubuntu 10.04 LTS Lucid


There is an easier way to install Webmin on Ubuntu 12.04 LTS! This walkthrough shows how to install Webmin 1.580 and upgrade the TLS self-signed certificate to use a 2048-bit key.


I had some trouble installing Webmin 1.510 on Ubuntu 10.04 LTS Server (aka Lucid). The problem is that Webmin uses a deprecated Perl module (a wrapper around Digest::MD5 for users of an ancient MD5 library) and both Debian and Ubuntu refuse to put it back into their respective repositories. Entirely within their rights, of course, but not so good for us weekend admins who want a painless install process.

Okay, so let’s get to work. I’m installing Webmin 1.510 via the remaining Debian packages.

Install the (easy) dependencies

Run this from a terminal. Expect some trouble from ‘libmd5-perl’.

$ sudo aptitude -y install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl apt-show-versions libapt-pkg-perl

You should find an error like this:

Couldn't find any package whose name or description matched "libmd5-perl"

The reason for this is that ‘libmd5-perl’ is persona non grata at both Debian and Ubuntu, as mentioned.

Install the deprecated dependencies

Download the libmd5-perl deb file and install it manually:

Open a browser and get the newest libmd5-perl package (from 2004 – lol)


The likely package is named: libmd5-perl_2.03-1_all.deb

so we download it and install it:

kelvin@example.com:~$ wget http://ftp.debian.org/pool/main/libm/libmd5-perl/libmd5-perl_2.03-1_all.deb
--2010-05-22 19:50:45--  http://ftp.debian.org/pool/main/libm/libmd5-perl/libmd5-perl_2.03-1_all.deb
Resolving ftp.debian.org..., 2001:610:1908:a000::149:226
Connecting to ftp.debian.org||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5700 (5.6K) [application/x-debian-package]
Saving to: `libmd5-perl_2.03-1_all.deb'

100%[=======================================================================>] 5,700       30.3K/s   in 0.2s    

2010-05-22 19:50:46 (30.3 KB/s) - `libmd5-perl_2.03-1_all.deb' saved [5700/5700]

kelvin@example.com:~$ sudo dpkg -i libmd5-perl_2.03-1_all.deb
Selecting previously deselected package libmd5-perl.
(Reading database ... 50494 files and directories currently installed.)
Unpacking libmd5-perl (from libmd5-perl_2.03-1_all.deb) ...
Setting up libmd5-perl (2.03-1) ...
Processing triggers for man-db ...

Install Webmin

The dependencies should all be installed now. We can download the Webmin deb package from Sourceforge.


Use the most recent deb package. In my case it was ‘webmin_1.510-2_all.deb

Sourceforge will generate a link for you to use from their web site. My link was:

kelvin@example.com:~$ wget http://downloads.sourceforge.net/project/webadmin/webmin/1.510/webmin_1.510-2_all.deb?use_mirror=cdnetworks-us-1
--2010-05-22 19:53:44--  http://downloads.sourceforge.net/project/webadmin/webmin/1.510/webmin_1.510-2_all.deb?use_mirror=cdnetworks-us-1
Resolving downloads.sourceforge.net...
Connecting to downloads.sourceforge.net||:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://cdnetworks-us-1.dl.sourceforge.net/project/webadmin/webmin/1.510/webmin_1.510-2_all.deb [following]
--2010-05-22 19:53:44--  http://cdnetworks-us-1.dl.sourceforge.net/project/webadmin/webmin/1.510/webmin_1.510-2_all.deb
Resolving cdnetworks-us-1.dl.sourceforge.net...
Connecting to cdnetworks-us-1.dl.sourceforge.net||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14504260 (14M) [application/octet-stream]
Saving to: `webmin_1.510-2_all.deb'

100%[===================================================================>] 14,504,260   512K/s   in 21s     

2010-05-22 19:54:06 (664 KB/s) - `webmin_1.510-2_all.deb' saved [14504260/14504260]

kelvin@example.com:~$ sudo dpkg -i webmin_1.510-2_all.deb
Selecting previously deselected package webmin.
(Reading database ... 50500 files and directories currently installed.)
Unpacking webmin (from webmin_1.510-2_all.deb) ...
Setting up webmin (1.510-2) ...
Webmin install complete. You can now login to https://example.com:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.

Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot

You should now be able to visit your webmin login page on port 10000 (use your own IP number):

Ideally, the Webmin gurus will refactor the old MD5 code dependencies, but this seems to work fine for now.

Happy Harvey Milk day!

Tags: , , ,

Sending Redmine mail via Google Apps hosted GMail

So I don’t why I always have trouble setting up web apps to send mail through my hosted GMail accounts (like, um, Redmine?). Really, it seems like I end up pulling my hair out every time I have to do it.

So the problem we want to solve today should be straightforward. I have a Ruby-on-Rails app called Redmine which I want to have send notifications and whatnot via my Google Apps hosted GMail account. So here’s some basic instruction from Redmine. Great. And here is my email.yml file that actually works (passwords and other crap redacted, obviously):

  delivery_method: :smtp
    tls: true
    address: "smtp.gmail.com"
    port: 587
    domain: "example.com"
    authentication: :plain
    user_name: "robots@example.com"
    password: N1ceP@55wurd!

This set-up will allow Redmine to send emails from robots@example.com using hosted GMail

Tags: , , , , ,

A fontsize too small?

Font is too small if you have macular degeneration

Goodbye XML

I’m leaving you XML. I’m just not into you anymore. I don’t think I ever was…I just used you. Sorry.

Why? You’re just too damn hard to read and you give me a headache. I always have to check if you’re well-formed and, frankly, most of the time, you’re not.

It’s not because you have only one root. No, it’s not. You’re always so damn verbose…and you use tabs everywhere we go and who picks those up? I do. That’s who.

Well, it stops today.

Yes, there is someone else.

Saturday night compilation

It’s another Saturday night at 9pm. Time to compile some code, right? Right?

So, before I start doing that, I’m on IM chatting with an old friend of mine in Toronto. He’s like: “What are you doing sitting in front of your computer on a Saturday night? HUH?”

Without blinking: “I’m building Cassandra this newish database thing…blah blah blah…”

So yeah he’s busy ignoring me by the time I get around to typing about Thrift. His point is that I’m playing with computers on a Saturday night, but on the other hand, he’s working on a press deadline (and it’s midnight in Toronto). What’s worse? I donno.

Tags: , ,

Install PHP 5.2.12 on Mac OS 10.5.8 Leopard

PHP 5.2.12 has a bug that will stop your installation:

/bin/sh /Users/kelvin/phpsource/php-5.2.12/libtool --silent --preserve-dup-deps --mode=compile gcc  ...includes redacted...  -no-cpp-precomp  -I/usr/local/php5/include -g -O2  -c /Users/kelvin/phpsource/php-5.2.12/ext/standard/dns.c -o ext/standard/dns.lo 
In file included from /usr/include/arpa/nameser.h:59,
                 from /Users/kelvin/phpsource/php-5.2.12/ext/standard/dns.c:62:
/usr/include/arpa/nameser8_compat.h:304: error: conflicting types for ‘HEADER’
/usr/include/arpa/nameser_compat.h:99: error: previous declaration of ‘HEADER’ was here
make: *** [ext/standard/dns.lo] Error 1
Trinity:~ kelvin$ 

Two header files (nameser8_compat.h & nameser_compat.h) both try to define a struct named HEADER. No can do. According to the PHP bug tracker, “NEVER ever include nameser_compat.h, it’s included in various ways in different OSes by nameser.h if needed


So how do we go about fixing this? The easiest thing to do is to install the older PHP 5.2.11 or the HEAD from the 5.2 branch. If you are adventurous or obsessive-compulsive you can also replace these two files with the patched copies:

  1. ~/php-5.2.12/configure.innotes
  2. ~/php-5.2.12/ext/standard/dns.cnotes

Tags: , , ,