Bats!

This is a bit of a saga, so I’ll do a quick intro before I get to the guts of it. I purchased a house in December 2006, and after a month or so living there I noticed a scratching noise in the walls. I pulled out the air-con, and looked into the wall cavity, and there was a roosting bat. So I did a bit of research into them, and decided they were getting in around the air-con, so I left the air-con out one night, and late in the evening sealed up the hole, and put it back in. Of course the next night there was still scratching, but not only there, in the ceiling as well. ...

March 11, 2007 · Nigel Sim

Getting out to get back in

I have a server box I look after that is buried deep inside a private network, behind the most restrictive of firewalls, which normally means I have to physically visit the site to perform any maintenance. To be able to do my work all I would need is an SSH connection. I have previously read about using HTTP proxies pointed at HTTPS ports to SSH out of restricted networks, but what about back in. So I put together this little python app, after finding no other solutions to my situation. ...

February 25, 2007 · Nigel Sim

Four things which would make my Linux wonderful

1. Presentation controller for my bluetooth phone In fact this already exists, in many forms apparently. The trick for me was to get it working. If I was to derive it from scratch I would have made a simple, mappable Java app for the phone, and would have written a Python app for the server. In fact this already exists in Xbtrc. The trick for me however, was to get the phone to find the computer. The phone could find other phones, and using the python rfcomm examples, I found the computers could find each other. The problem, it turns out, was the computer needs to be put into discoverable mode for the phone to be able to find it. ...

January 18, 2007 · Nigel Sim

Roof colours impact on temperature

These are some preliminary results for roof colour tests I am conducting. The setup is 8 equal sized pieces of roofing material, some painted with different coloured roof paints. They were left out in full 12noon summer sun (Lat 19 south), and the temperature of the under side of the material was measured after 30 minutes exposure. Results follow: White Colour Bond 48C Painted white Zincalume 45C 2 coats painted white Zincalume 43C 2 coats painted white Colour Bond 45C Black painted Zincalume 70C Silver painted Zincalume 63C Gold painted Zincalume 60C Unpainted Zincalume 50C I’m going to conduct this again soon, with an 8 channel data logger, so more precise results can be presented. But for now, you can get the jist of what is happening. ...

November 29, 2006 · Nigel Sim

Personal flash video player

With this handy little util, flash video player, and ffmpeg to do the conversion it is easy to embed videos in your website, without having to use a video sharing site like youtube. This is of great importance to intranets, and protected sources. Why run the flash route? Easy, it’s the only working, embedded video player in Linux. ffmpeg -i **infile** -t flv -ar 44100 **outfile**.flv Just a note, you seem to have to have the whole thing on a webserver for it to work. It won’t work straight off your hard drive. ...

October 16, 2006 · Nigel Sim

Quick survey of useful Drupal 4.7 modules

All these modules are related to blogging, and information gathering, rather than social networking, or any of the other roles Drupal fulfills. Related Links The related links module allow you to specify external links which relate to the entry. It also, automatically extracts links from the body. These links can be displayed in a Related Links block, as well as those related by topic in the Related Topics block. The use of a multiline textarea to store the extra links, in HTML markup is a bit of a drawback. This has a couple of issues. One, if you have a Rich Text area installed it will stuff things up for you. And secondly, requiring the links to be in HTML is a bit of a drag for userfriendlyness. ...

October 4, 2006 · Nigel Sim

Java HTML Table parser

I put together this class for scraping HTML tables. It supports nested tables. At some stage I’ll put this up in SVN along with it’s test cases. import java.io.IOException; import java.io.Reader; import java.util.ArrayList; import java.util.Stack; import javax.swing.text.MutableAttributeSet; import javax.swing.text.html.HTML; import javax.swing.text.html.HTMLEditorKit; import javax.swing.text.html.HTML.Tag; import javax.swing.text.html.parser.ParserDelegator; import org.apache.log4j.Logger; public class TableParser extends ArrayList { static Logger logger = Logger.getLogger(TableParser.class); Stack s = new Stack(); /** * Process this reader. * @param f * @throws IOException */ public void parse(Reader f) throws IOException { this.clear(); new ParserDelegator().parse(f, parser, false); } private HTMLEditorKit.ParserCallback parser = new HTMLEditorKit.ParserCallback() { private boolean inTD; private String tdBuffer; public void handleError(String arg0, int arg1) { // System.out.println("Error "+arg0); // TODO Auto-generated method stub super.handleError(arg0, arg1); } public void handleText(char[] arg0, int arg1) { if (inTD){ tdBuffer += new String(arg0); } } public void handleStartTag(Tag tag, MutableAttributeSet arg1, int arg2) { if (tag == HTML.Tag.TABLE){ s.add(new TableParser.HTMLTable()); } else if (tag == HTML.Tag.TR){ s.add(new TableParser.HTMLRow()); } else if (tag == HTML.Tag.TD){ inTD = true; tdBuffer = ""; } } public void handleEndTag(Tag tag, int arg1) { if (tag == HTML.Tag.TABLE){ TableParser.HTMLTable T = (TableParser.HTMLTable)s.pop(); if (s.size() == 0){ TableParser.this.add(T); } else if (s.peek() instanceof HTMLRow){ ((HTMLRow)s.peek()).add(T); } else { logger.error("Need to be within nothing or a cell/row"); } } else if (tag == HTML.Tag.TR){ HTMLRow r = (HTMLRow)s.pop(); ((TableParser.HTMLTable)s.peek()).add(r); } else if (tag == HTML.Tag.TD){ if (inTD){ ((TableParser.HTMLRow)s.peek()).add(tdBuffer); inTD = false; } } } }; public class HTMLTable extends ArrayList{} public class HTMLRow extends ArrayList{} }

September 28, 2006 · Nigel Sim

SolarLibrary released

Well, after 2 days of development and testing, I’ve just released SolarLibrary 0.1. Along with this is a new, bug fix version of SolarCategories, which mainly deals with UI issues born out of never using my own interface :). So, SolarLibrary allows you to store and categories (with multiple categories) links, text, and files. The files are stored in a secure download behind SolarGroups authorization. I haven’t really tested this system on a wide range of people yet, but if nothing else, it offers a good example of what SolarGroups and SolarCategories are meant to do. Library notes are here. ...

July 5, 2006 · Nigel Sim

Working on SolarLibrary

I’ve just started cutting new code for SolarLibrary, which is supost to be a partially structed, categorised repository for different types of data, built as a Mambo component. The reason for doing this is for my purposes, I want links, text, files extra to all share the same category space, and be accessable through the same brower view. This is very Drupalesk. But at the moment drupal also doesn’t fit this bill, and I don’t really like the module architecture, which I am quite fond of the Mambo architecture. Besides, I have several other Mambo components which could do with a minor overhaul, and building this component justifies it. ...

July 3, 2006 · Nigel Sim

Retrofitting hybrid car technology

After having driven a hybrid car for the first time I was curious if it would be possible to retrofit this kind of technology to an existing vehicle. Basically an electric drive which connects into the crank, or there abouts, which can assist when the engine is under load. Surprisingly there isn’t that many products on the market, with the exception of this: Electrocharger / Retrofit Hybrid :: Sigma Automotive I’m now searching for some products which are actually in production, or some DIY projects. Any help? ...

July 2, 2006 · Nigel Sim