News aggregator
Blog site setup
Nginx setup (in
/etc/nginx/sites-available/blog.johnp.net):
server {
listen 80;
server_name blog.johnp.net;
access_log /home/www/blog.johnp.net/log/access.log;
error_log /home/www/blog.johnp.net/log/error.log;
# Common include & image files.
location ^~ /i/ {
alias /home/www/i/;
}
location ^~ /images/ {
alias /home/www/images/;
}
# There are only two non-blog URIs to worry about.
location = /favicon.ico {
alias /home/www/blog.johnp.net/htdocs/favicon.ico;
}
location = /robots.txt {
alias /home/www/blog.johnp.net/htdocs/robots.txt;
}
# Pass all other URLs to PyBlosxom running under Paste.
location ~ / {
fastcgi_pass localhost:4999;
fastcgi_param PATH_INFO $request_uri;
include fastcgi_params;
}
}
My little server is running Ubuntu, which has
/etc/nginx/fastcgi_params for all the "standard" CGI
variables. But PyBlosxom wanted
PATH_INFO as well.
Python Paste setup (in /home/john/blog/etc/blog.ini):
#!/usr/bin/env paster
[default]
debug = false
[exe]
command = serve
daemon = true
reload = true
reload-interval = 120
monitor-restart = true
pid-file = /home/john/blog/etc/paster.pid
log-file = /home/john/blog/log/paster.log
[server:main]
use = egg:Flup#fcgi_thread
host = 127.0.0.1
port = 4999
[app:main]
paste.app_factory = Pyblosxom.pyblosxom:pyblosxom_app_factory
configpydir = /etc/pyblosxom
Unfortunately the "executable shell script" stuff mentioned in the
docs doesn't work too
well for me (which it does warn you about), so I've wrapped the
paste serve invocation into a short script:
#!/bin/bash # serve-blog.sh - Run Python Paste to serve my PyBlosxom blog. # File Created: 14 October 2009 # Author: John Pallister (mailto:john@synchromesh.com) CONFIG_FILE=/home/john/blog/etc/blog.ini /usr/bin/paster serve --daemon \ --reload \ --reload-interval=120 \ --monitor-restart \ --pid-file=/home/john/blog/etc/paster.pid \ --log-file=/home/john/blog/log/paster.log \ $CONFIG_FILE \ $* # End of serve-blog.sh
I have added this script to my rc.local to run at boot time.
Relevant bits of my PyBlosxom setup (in /etc/pyblosxom/config.py):
# 2 Oct 09 JDP Note: I have modified /usr/share/python-support/pyblosxom/Pyblosxom/pyblosxom.py
# to read '.blog' files instead of '.txt' files.
#
# Unused variables:
# renderer
# default_flavour
#
[snip]
py["datadir"] = "/home/john/blog/entries" py["logdir"] = "/home/john/blog/log" # This doesn't seem to be used... py["log_file"] = "/home/john/blog/log/pyblosxom.log" py["log_level"] = "warning" # The next two lines were good when debugging my archives plugin. #py["log_level"] = "debug" #py["renderer"] = "debug" py["base_url"] = "http://blog.johnp.net" py["flavourdir"] = "/home/john/blog/flavours" py["plugin_dirs"] = ["/etc/pyblosxom/plugins", "/home/john/blog/plugins"] py["load_plugins"] = ["disqus", "myarchives"] py["cacheDriver"] = "entrypickle" py["cacheConfig"] = "/var/run/pyblosxom-cache"
This is not the complete setup, but it has the interesting stuff. I
copied the default HTML flavour files (content_type.html,
date_head.html, foot.html,
head.html, and story.html) into
/home/john/blog/flavours/html.flav/ for tweaking.
Hopefully someone will find this useful.
Blog ideas
Emboldened by my success in writing an archives plugin, I'd now like to do one for my blog categories and another to suck down my recent Delicious link posts.
I'd also like to re-do the layout so it doesn't look so primitive. I was reading a post on Peter Seibel's blog the other day, and his layout & HTML source looked pretty good, so I might do something based on that.
But none of these things are particularly urgent, so I think I'll move on to trying to get ABCL running on the Google App Engine (after having spent a fair bit of time getting JDEE and its dependencies set up in Emacs). But I do intend to do a post on my Nginx/Paste/PyBlosxom setup.
And now, having finished this post, it's time to go to bed.
First post 2009: PyBlosxom is go!
Well, I've finally got around to moving this blog to PyBlosxom. I've written my own plugin to generate the archives at the top of the page; I'm also now running on Nginx as a web server, which talks to Python Paste via FastCGI. So the blog is now dynamically generated. The next thing is to try and integrate the Disqus comments plugin.
The other thing I need to do is move the rest of my personal site(s) to this server.
I have lots of things I'd like to blog about; it's great to finally have this sorted out.
And yes, it's been another very busy year. Since my last post my third child was born (Hi Theo!), my oldest has started school (Hi Bethany!) and we've moved half-way around the world for a while... so stay tuned for more news (OK, maybe "news" is the wrong word).
Exporting H.264 video to a Nokia 6234 as MPEG-4 via QuickTime Pro
Via Tim Prebble's blog, some nice video podcasts by Christopher Willits from XLR8R TV. The story so far:
- Part 1 (Ep. 42), the basics.
- Part 2 (Ep. 46), using Ableton Live.
- Part 3 (Ep. 52), a MIDI pickup and a GR-20.
- Part 4 (Ep. 74), recording at SnowGhost.
- Part 5 (Ep. 82), automation clips.
You can download nice 640-by-360 H.264-encoded QuickTime movies of each episode (approx. 100MB per video), and I thought it'd be nice to watch them on my Nokia 6234 phone. (These seem to be very popular here in New Zealand; at least, after I bought mine the next four people I met with a 3G phone also had a 6234.)
After reading a useful Nokia article on creating mobile videos, I fired up QuickTime 7 Pro and started exporting the movies with different settings. This is what I came up with for the best results (and about 28MB per video):

Video export settings.

Audio export settings.
The nice thing about doing this myself is that I could keep the audio bandwidth high (so it sounded pleasant) while scrunching the video (so the phone could play it cleanly). The audio bitstream accounts for half the file size.
I would love to have time to actually try this stuff myself. I have a GK-2a pickup and an old GM-70 I picked up on Trade Me; one day I'll manage to get it all set up and have a play. (Perhaps by then I'll have a Graphtech Ghost setup and an Axon AX100 instead.)
tracs-wiki.el and TRAMP
I have managed to get trac-wiki.el and TRAMP set up under Emacs 23.0 on Windows. This means that I can now edit Trac wiki pages via XML-RPC and edit these blog posts via SSH. Sweet!
References:
- trac-wiki.el by Shun-ichi Goto.
- xml-rpc.el
- The Trac XML-RPC Plugin
.emacs configuration:
(add-to-list 'load-path "D:/src/other-lisp/emacs-lisp")
(require 'trac-wiki)
(trac-wiki-define-project "tracs3" "http://tracs3.synchromesh.com/trac/" t)
(let ((auth (base64-encode-string (format "%s:%s" "<my username>" "<my password>"))))
(set (symbol-value 'url-basic-auth-storage)
`(("tracs3.synchromesh.com:80" ("Restricted Access" . ,auth)))))
(autoload 'trac-wiki "trac-wiki" "Trac wiki editing entry-point." t)
My .emacs configuration for TRAMP is:
(require 'tramp)
(setq tramp-default-method "pscp"
tramp-default-host "synchromesh.com")
(add-to-list 'tramp-default-user-alist
'("pscp" ".*\\.synchromesh\\.com\\'" "<my username>"))
Hopefully this means I'll update both the TRaCS 3 wiki and this blog a bit more frequently...
Ngake site(s) design page started
I've started some notes on the future of Ngake. The idea is that I develop Ngake as a site all about Ngake sites. Simple, really.
Surecom EP-816VX 16-port 10/100 switch
mod_lisp refresh for Win32 Apache 2.2.8
I have recompiled mod_lisp2.c against Apache 2.2.8 for Windows using Visual C++ Express 2008. mod_lisp itself only needs the include files and libraries that are an optional part of the Apache binary installation, but I downloaded the Apache source (that includes Visual Studio 6 project files) so that I could check the compiler and linker settings.
My slightly modified mod_lisp2.c, the Visual C++ 9 project file and the Release build of the module are available in a .zip file. Please note the title of this blog when considering whether to use any of it.
The diff looks like this:
*** ../../download/programming/Other Lisp stuff/mod_lisp2 - svn.c Tue Apr 8 23:33:07 2008
--- mod_lisp2.c Mon Jun 2 18:15:31 2008
***************
*** 443,451 ****
{
char crlf[2] = {0xd, 0xa};
char length[16];
! snprintf(length, 16, "%x", n_bytes);
! apr_status_t status = write_lisp_data (socket, length, strlen(length));
if ( status == APR_SUCCESS)
{
status = write_lisp_data (socket, crlf, 2);
--- 443,453 ----
{
char crlf[2] = {0xd, 0xa};
char length[16];
! apr_status_t status;
!
! apr_snprintf(length, 16, "%x", n_bytes); // 2 Jun 08 JDP
! status = write_lisp_data (socket, length, strlen(length));
if ( status == APR_SUCCESS)
{
status = write_lisp_data (socket, crlf, 2);
Forgive the proud father
I admit I have been littering the house with musical instruments, and this is pretty much my desired result:
Not bad for 20 months old!
I'm really enjoying having the piano there, and my own keyboard skills are slowly improving. But it looks like I'll have to work on my self-accompaniment if I'm going to keep up...
More Ajax3D options
OK, there are more options than the ones I listed in my last post. Some others include:
Instant Reality
Developed by the Fraunhofer Institute in Germany, this is a "high-performance Mixed Reality (MR) system, which combines various components to provide a single and consistent interface for AR/VR developers." Runs on Windows with beta versions available for Linux and OS X. Full X3D with extensions for clustering, devices, stereo and more. No browser plugins (although they're on the roadmap). Not exactly sure what the licensing is like, but they seem to be free to use for non-commercial stuff at least. Static logos on scenes. No source available AFAICT.
Java 3D
This is probably a better solution than I give it credit for, but for various reasons it turns me off.
Papervision3D or Away3D
Papervision3D (or PV3D as it is known) is a 3D engine written in Flash. Away3D is a fork of PV3D.
From a purely technical point of view I'd much rather use an X3D plug-in that calls the underlying hardware-accelerated 3D directly. Obviously the performance would be far superior; also the language itself is much better suited to the task. But the reality is that I can't really do that with a free, cross-platform player that doesn't have someone else's logo in the corner. And requiring people to download a plug-in is still (seen as) a significant disincentive to new users. I think that installing a Firefox add-in might be less of a barrier, but there aren't any for VRML or X3D (yet).
However, in other ways it's not really that bad. Flash 10 is on its way and apparently it will include some 3D support for projects like PV3D. (See this interview with Rob Bateman of Away 3D and this interview with Ralph Hauwert of PV3D.)
Also, the sort of stuff I want to start with doesn't require anything terribly amazing in terms of sheer 3D horsepower. Hopefully by the time I have something that people actually find useful, PV3D and Flash will have evolved together into more of a fully-fledged Web 3D (if not X3D) solution.
In the meantime, I guess PV3D is a case of "worse is better", at least compared to X3D and Croquet.
See also the Papervision3D developers blog, some tutorials and other resources and the code.
Croquet
Technically the best solution. Fully open-source and cross-platform. IMHO destined never to catch on widely (compared to Flash). Which just goes to show that there ain't no justice in this game.
Links
A few links to vaguely relevant 3D stuff on the web (some courtesy of Miles):
- chronotext.org
- "chronotext is a growing collection of software experiments exploring the relation between text, space and time" by Ariel Malka, "a designer and programmer based in Tel-Aviv." Uses Java 3D and Java Web Start.
- Ogoglio
- An attempt to build a city in the metaverse. By Trevor Smith. Uses Java 3D, Apache & Tomcat etc. but not X3D. Runs in the browser, uses OSS protocols, formats and libraries.
- PV3World blog
- A sort of community site for Papervision3D.
32 Commits Today
Yes, I know “commits” are about as informative as “Lines of Code” but it does sometimes help you see where you are in comparison to other days.
Thanks to the terrible Wellington weather I stayed home all day and hacked. It was awesome. It turns out I did 32 commits today to my current project. Correction, I have two projects on the go (one at home and one at the office). This is for the one I’m doing at home. After all that I am (1) tired, (2) chuffed I was so productive and (3) happy!
The most interesting of these of course is (2). I have found that since I quit my job and am doing my own thing, I am almost infinitely more productive. Firstly, I know the ins and outs of the system, secondly I have no interruptions (irc, email, phone, in-person, clients) and finally, all my projects are just so much more interesting than previous things I’ve worked on. And yep, that includes a satellite control system! :)
Zune 4.2 software available now via Windows Update
Installing it as we err, blog. How very Apple iTunes.
The Zune Software push is very likely in preparation for the impending Windows Phone 7 launch. I'm curious to see how it replaces or complements Windows Media Player/Centre.
Technorati Tags: Windows Phone 7,Microsoft,ZunePolice says no evidence Google committed a crime with Street View Wi-Fi snooping
Received a media release from the NZ Police a moment ago, that seems to say that if you leave your Wi-Fi connection unencrypted so that others can snoop on your data "tough, you have yourself to blame".
We'll see if the Privacy Commissioner takes the matter further. Privacy Commissioner Marie Shroff has expressed surprise that Google didn't tell the public more clearly that the information would be collected and has asked for further details about.
Police has referred the matter of data collection from Wi-Fi networks by Google Street View back to the office of the Privacy Commissioner.
The Privacy Commissioner formally referred the matter to Police in June following concerns over Google obtaining unencrypted Wi-Fi data while collecting panoramic digital images for its Street View service.
An investigation by Police has determined that there is no evidence to suggest a criminal offence has been committed.
Police has now handed the matter back to the Privacy Commissioner for further consideration.
Detective Senior Sergeant John van den Heuvel of the Police National Cyber Crime Centre says the matter is a timely reminder about Wi-Fi security:
"Anyone using Wi-Fi needs to ensure they have appropriate security measures in place. People should not underestimate the risk that information they broadcast might be accessed by others, either inadvertently or for more sinister purposes."
a cat named linux

a cat named linux, originally uploaded by Br3nda.
In memory of our old family cat, my sister's old kitty: Linux.
1996 - 31st August 2010.
Review: Kick Ass
I don’t usually review movies, but after giving two copies of Kick Ass away to readers, I’ve agreed to write up my thoughts.
I’ve always complained about the anti-piracy assault that you get from most DVDs and Blurays. Think about it: I’ve just paid for a legitimate copy of your movie, and you spend the first few minutes berating me for being a dirty pirate. So the start of Universal’s Kick Ass Bluray is a very pleasant surprise. There’s a couple of short disclaimers, then a big giant THANK YOU drops onto the screen, with a voiceover saying something along the lines of “By purchasing this movie, you are helping to support your local film and television industry. Thank you!”. I’m not sure if this is a universal feature of Universal Bluray, but big-ups for doing it right.
The film itself? I’ve never been a comic reader, nor heard anything about Kick Ass before the movie came out. I come at the movie with no background whatsoever. It was fun. It stands alone as a quirky action movie with a fairly standard hero/villain storyline, but plenty of silliness to have you chuckling.
There’s been some controversy around the Hit-Girl character, drawn as a young girl in the original comics, and played by a 12 year old actor in the movie. I reckon it’s all a bit overblown. Hit-Girl is awesome – a tiny girl who can kick some serious ass. The movie is R18, so it’s not like a 12 year old is going to watch the movie then go out and buy some double-ended knives.
I also liked Nicolas Cage, hilariously overacting a Nolanesque Batman character. Again, a polarising performance which I personally loved but you might find grating.
The way I tend to rate movies is by the number of times I look at my watch during the movie. Watching Kick Ass on Bluray with full HD and surround sound, I didn’t check once. It was great!
Video: LASERS!
Who doesn’t love lasers? Favourite tool of the James Bond villian, and weapon of choice for Luke Skywalker. Today I took a look at some slightly less awesome laser-based gadgets. Read on to see which ones Dr Evil would love, and which you should give a miss.
Click the image below to see the video:
| Item: | High Power Laser Pointer |
| Price: | $60 (US$40 + free shipping) |
| Rating: | 4 / 5 |
| Info: | Mostly useless, but hours of fun. This high-powered laser pointer will pop black balloons, light dark matches, and cut through black plastic. It’s not a toy, and shouldn’t be used by anyone under 16 without supervision. When you’re not using it to light fires, it might come in handy for pointing out stars or pointing at positions on a large building site. |
| Item: | Laser distance measuring device |
| Price: | $30 (US$21 + free shipping) |
| Rating: | 2 / 5 |
| Info: | Using a laser to point our the target, this device actually measures the distance using ultrasonic sound – just like a bat. It’s vaguely accurate, but easily put off by angles, reflections, and just about anything else. I guess you get what you pay for here – $30 is not a lot of money. |
| Item: | Non-contact thermometer |
| Price: | $119 |
| Rating: | 5 / 5 |
| Info: | If you need to know the temperature of any surface, this device is for you. Point the laser at your target and pull the trigger, and you’ll instantly know the temperature of the surface. Useful if you have a pizza oven, or perhaps if you’re tuning cars or operating machinery. Or even if you just want to have fun like my son – running around the house and measuring the temperature of every surface, from -18degrees in the freezer to +600degrees on the stove element. |
| Item: | Solar powered ‘laser’ alarm clock |
| Price: | $29.90 |
| Rating: | 2 / 5 |
| Info: | Too lazy to lift your head and check the time? Just hit the button on top of this alarm clock and it will project the time onto the ceiling where you can see it. Otherwise, it’s a cheap solar powered alarm clock. |
Software Patents and ITANZ
It is easy to think that the software patents issue is this year's news. But it is worth reflecting on the fact that, in New Zealand as elsewhere, practically the entire IT industry has been campaigning against software patents for years. What was highly unusual *this* year was an New Zealand IT vendor organisation, NZICT, coming out in favour of software patents.
Got to touch a pair of Windows Phone 7 devices
Been running around Tech Ed 2010 here in Auckland, checking out what's new in Microsoft-land. The one thing that most people are curious about is Windows Phone 7, so here it is.
Check out my piece in Computerworld on my initial impressions of Windows Phone 7.
One thing's for sure - I wish Microsoft had called it something else. Writing about Windows Phone 7 phones sounds stupid.
Technorati Tags: Windows Phone 7,Microsoft,Tech-Ed 2010,New ZealandThe Puppetmaster
I’ve been asking to have ‘The Puppetmaster’ as my job title for quite a while now – ever since I first discovered the joys of configuration management with Puppet some 18 months ago. We do a reasonable number of solutions that involve Puppet, with more coming up soon. I’m not exactly a Puppet guru – not yet, at any rate – but I am the person who has the most familiarity with it and the most experience with it here.
My new business cards arrived today and about half of them look like this. I’m going to have to dedicate myself to becoming a true master of Puppet to be worthy of these!
That and buy my manager a beer or five.




