Blogs

Transparent Watermarks with GD and Ffmpeg

I've just needed to create a text overlay on a video using a transparent PNG file. This could be a watermark or similar but I'm using it for a different purpose. Here's some php code to create an image suitable for using as an overlay in ffmpeg.

Not so smart quotes

I've had a bit of a headache just recently, converting an MS Access database to a MySQL one. I used a helpful little tool called dataloader on a virtual machine to get the mysql dump out but smart quotes and other characters outside of the standard ascii set didn't import correctly into mysql. In fact, it just truncated the contents of that field an the point that it encountered the offending character.

Ruby muscles in

I have been lured into testing the waters with some Ruby development lately. I'm still feeling very much out of my depth and prowling the net for answers. If I can get a little bit more up to speed with it, maybe I can be of more use in hack days as they are often basing their projects on Ruby if not rails too.

My first real project with rails is meeting with a bit of an error right now. I've made a rather nice infinite loop that is killing the programme. If I can get it tweaked then given the lengths I've been having to go through to get a result, I can see a use for the resulting code.

Build PIL on Snow Leopard

I have had a right game trying to get the Python imaging library working on my machine. I kept getting Symbol not found: _jpeg_resync_to_restart when trying to import _imaging and in django I got the lovely error saying that the Imaging C library was not installed. It all pointed at libjpeg and seemed to be an architecture thing so I needed a universal version.

I tried the dmg file from http://ethan.tira-thompson.org/Mac_OS_X_Ports.html and this too http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/

Python is odd

I have a couple of jobs using the django framework on the go which is written in python; a language I haven't really used before. After a good bit of sifting through code and finding my feet I can't help but feel that it doesn't know what it really is.

Firstly it has some OOP but not fully; no static vars or access levels for vars or methods. Even php has this. Then there is fact that it compiles, sort of, but you can't just deploy the compiled files. It needs the source there too.

Subversion off-site

I have recently been doing a lot more work for my own clients rather than working for one company. I love subversion but I didn't really want to burden myself with the upkeep of a server at home so I had a hunt for alternatives.

Hackitude reloaded (or revisited)

Some news I would have posted earlier if my site worked is that we are having a wee drink to get the hackitude peeps back together in the same room again. It's to reignite the enthusiasm that we had before Christmas on the project.

A chance for us to figure out where the next step for the project will take us. The foundation that has been laid is a simple yet highly flexible framework for any data that needs to store collections of location data. Hopefully we will be rolling it out to include time data to enable event capturing too.

Site back up

Not sure what happened over Christmas but the site should now be up and running as it was before. Without it, I'm afraid that the folks on twitter have had to put up with my rants.

On a work-wise note, I'm just having a look at Kohana the php framework as an alternative to building in wordpress or drupal when all I need to do is serve some data. I could code something in python (django) or java etc but the server it's needed for is mostly geared up for php.

Hackitude

For info on what we got up to and where things are going, please see the hackitude site. We had a great time and Mark Steadman was a proper trooper setting it up and getting us all together.

I think what we have at the end of it is quite an interesting foundation for future work. It's a way of storing things at places and displaying them on a map. Been done before? probably but the concept here is to aggregate data from various sources and provide easy access to it.

Morning of Failures

This morning has been a bit of a trial. While I'm normally one for grumbling out loud and those of you that know me will attest to this, this morning has ben particularly useless and needs to be vented.

Apart from my car deciding it would like to collect moisture and allow it to freeze to the inside of the windscreen, it started fine as it always has and I got to the station in plenty of time, or so I thought.