tadhg.com
tadhg.com
 

Posts concerning coding

Python Script to Change OS X Desktop Backgrounds

22:42 29 Jun 2009

OS X has built-in functionality to rotate between different desktop backgrounds, but if you have multiple monitors and want backgrounds that fit together (i.e. that have two halves, one on each monitor), you need to set that manually. I wanted a script to do this for me, selecting a pair of backgrounds for each day. I wrote one in AppleScript, but was so unimpressed by it that I decided I’d do it over in Python.
[more...]

Permalink     Comment     [, , ]    

Python Syntax Highlighting for star-light

23:37 26 Jun 2009

A couple of years ago I plugged star-light, a syntax highlighter that’s entirely client-side. I’ve been happy with it, but wanted a Python mode for it. I was going to post some other code this evening, and then decided that I should just make the Python mode myself.

This led to fun with regular expressions.
[more...]

Permalink     Comment     [, , , , ]    

PyWebSF Logo Attempt

23:03 21 Jun 2009

My brother asked me a while ago to design a logo for PyWebSF, and tonight I took a shot at it. Part of me thinks it has a certain something, and part of me thinks it’s exactly the sort of thing you get when you ask an engineer to do a designer’s job.
[more...]

Permalink     Comment     [, , ]    

WordPress 2.8 Upgrade

17:44 14 Jun 2009

Today I upgraded this blog to WordPress 2.8, a relatively smooth process. I ran into completely unrelated problems (hitting the process limit for my shell account) that derailed things for a while, but the WordPress upgrade itself was smooth.

I use Subversion to upgrade, first using
svn export --force http://core.svn.wordpress.org/tags/2.8/ .
in my development environment, seeing if things look okay there, then checking in the 2.8 changes to my own repository (the only niggly part because I neglected to clean the dev environment of changes before the export, so I had to look through things to see what was part of the upgrade), backing up my live database, and then checking the changes out to the live environment. It all looks fine, and hopefully will continue to function normally.

Permalink     Comment     [, , , , , ]    

Pylons Via Apache Port Issues

16:42 12 Jun 2009

I’ve been using Pylons (and, more recently, the Pylons-based TurboGears 2.0) for various projects for a while, and a few weeks ago ran into an annoying and specific problem: using Pylons via Apache made Pylons occasionally think it was running on a different port.

There’s a relatively easy answer to this, but until I was reading through TurboGears documentation, I didn’t find it.
[more...]

Permalink     Comment     [, , , , , ]    

PyWebSF: Meetup for SF-Area Python Web Developers

22:07 09 Jun 2009. Updated: 19:42 11 Jun 2009

My brother is organizing what will hopefully become a regular web-centric Python meeting. The first meeting is planned for 18:00 Tue 23 Jun 2009 at the SF Public Library. I think a couple of speakers are lined up already, although I don’t have details on the talks. I’ll be there, and if you’re a Python developer with web interests, or a web developer into or curious about Python, you should attend too!

Permalink     Comment     [, , , , ]    

WP Plugins: Recent Commentary and Show Tags in RSS

19:38 23 Mar 2009

I finally got around to writing up docs for, and then packaging, the two WordPress plugins I’ve finished recently:

I’m currently looking at support for series in WordPress, and am considering either writing my own plugin or using/forking the Organize Series plugin.

Permalink     Comment     [, , , , , ]    

Some RSS Changes

19:44 19 Mar 2009

I’ve made some changes to my Related Posts by Tags plugin, so that it’s now possible to add the list of related posts to the RSS feed entries. As I was experimenting with this, I realized that I wanted the RSS entries to show the tags for a post as well, so I wrote a (very simple) plugin to do that, too.

As a result, those of you reading this via RSS will now see a list of tags at the end of posts, followed by links to related posts. Please let me know if this doesn’t work as intended, or if you have other comments on the change.

Permalink     5 Comments     [, , , , ]    

Yahoo!’s Website Performance Rules

16:32 12 Mar 2009. Updated: 02:38 15 Mar 2009

While I’m familiar with a lot of them, I’d never actually read Yahoo!’s performance recommendations. They’re clearly laid out, with lots of good information in there. I should have a look at changing some of my own stuff into CSS sprites, as well as some of the other suggestions—these rules make a difference to users even on sites like mine.

Except for those of you who read all this via RSS, of course.

Permalink     Comment     [, , ]    

New Blog Functionality: Recent Commentary

21:39 23 Feb 2009

I’ve had a Recent Comments section on the front-page sidebar of the site for quite some time, and decided it was time for an upgrade. The old version was straightforward: it displayed a list of the most recent comments and who made them. What I decided I wanted was, rather, a list of the posts with the most recent comments on them, how many comments there were, and a list of the people who made the comments in timestamp order.
[more...]

Permalink     Comment     [, , , , , ]    

My WordPress Development Setup

16:29 13 Feb 2009

One of the first things I did with my resuscitated blog was to figure out how I could develop for it in a reasonable fashion.
[more...]

Permalink     Comment     [, , , , ]    

Related Posts Plugin and SQL Trickery

11:55 10 Feb 2009
Permalink     4 Comments     [, , , , ]    

Blog Move Steps, Part Three: DNS Change

23:58 27 Jan 2009. Updated: 01:13 30 Jan 2009

I’ve wrangled my old plugins and custom code so that it mostly works, except for one or two features (such as “related posts” based on tags) that I’ll revive later. Good enough for now, so I’m making the DNS changes and going ahead.

If you’re seeing this text, you’re on the new server, and all should be well. But if you don’t see another post after this one by about Friday, it suggests RSS problems, so please drop me a line.

Permalink     1 Comment     [, , ]    

Blog Move Steps, Part Two

22:30 26 Jan 2009. Updated: 16:46 28 Jan 2009

I continued working on the blog move today, and most of the tricky database-related steps are done.
[more...]

Permalink     Comment     [, , ]    

Blog Move Steps, Part One

23:53 25 Jan 2009. Updated: 16:46 28 Jan 2009

I spent time today working on moving this blog to a new home, while also combining the articles from the old (real) blog and from this temporary one, and upgrading my version of WordPress in the process.
[more...]

Permalink     Comment     [, , ]    

Rules of Database App Aging

18:58 19 Jan 2009. Updated: 16:48 28 Jan 2009

I came across a blog post about the Rules of Database App Aging today. I’m having another look at my database assumptions at the moment, and the three rules that Peter Hawkins lays out seem solid:
1. All Fields Become Optional.
2. All Relationships Become Many-to-Many.
3. Chatter Always Expands.
[more...]

Permalink     2 Comments     [, ]    

Book List

23:56 24 Nov 2008. Updated: 17:12 28 Jan 2009

I haven’t got any graphs, despite what I said last time. I had some, but messed them up while experimenting with Flot, and in any case they weren’t quite what I wanted. However, I did solve some of the other issues I was having with my book-tracking application, and am relatively happy with the current view.
[more...]

Permalink     1 Comment     [, , , , , ]    

jQuery Improvements

23:59 13 Jun 2008. Updated: 07:40 14 Jun 2008

Recently I’ve been noticing once again how useful jQuery is, and wondering how I ever did DOM manipulation without it. It’s been a while since I’ve really looked at the release notes, but the latest version (1.2.6) has some significant improvements in it.
[more...]

Permalink     Comment     [, , ]    

Cumulative Micro-Fraud

17:36 05 Jun 2008. Updated: 01:57 06 Jun 2008

I love this. I’m sorry that it appears to be fraud—I’d be perfectly happy if he had found a legal as well as technical loophole and exploited it. I’m curious about whether or not it would have been fraud if he’d used his real name and details every time. Lastly, it’s quite interesting that he was caught due to government snooping on bogus accounts, and not by financial security systems.

Permalink     Comment     [, , ]    

Literary Awards in Freebase

19:04 29 Apr 2008

I’ve been playing around with literary awards in Freebase recently, mainly the novel/fiction Booker, Pulitzer, National Book Award, Hugo, Nebula, and Locus awards.
[more...]

Permalink     Comment     [, , , , , , , ]    

Short Subversion/Unix CLI Trick

17:19 10 Apr 2008. Updated: 23:27 15 Apr 2008

I use Subversion a lot both at work and at home, and for a while have wanted a way to make it easier to see which files get marked as merged or conflicted in an update.
[more...]

Permalink     Comment     [, ]    

Editable Google Maps

23:29 18 Mar 2008

Depending on how well they can deal with spam, and how open they make it, this could be a big deal. Google are letting users edit locations in Google Maps.
[more...]

Permalink     Comment     [, , , ]    

Data Fever

19:56 10 Mar 2008

Since last Thursday I’ve essentially been in the the grip of a compulsion to enter data into Freebase.
[more...]

Permalink     Comment     [, , , , , , ]