Author Archives: Devin Lane

About Devin Lane

I'm all about the bits

Enable WordPress Automatic Updates on a Debian Server

I attempted to get WordPress to update plugins automatically on my Debian server today, and found it a bit less than trivial due to the number of configuration gotchas. Assuming you’re running a Debian server (I have 6.0 Squeeze), on which WordPress is installed in /var/www/site/public_html: 1) Install required packages. I used vsftpd. sudo apt-get install vsftpd openssl 2) Configure vsftpd. I set the following options in /etc/vsftpd.conf # Enable only local users, no anonymous anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 # … Continue reading

Posted in General | Leave a comment

When you need std::remove_const

I ran across an interesting case where I needed to use std::remove_const to ensure a template parameter wasn’t const by default. I had something like this: const Matrix<4> m4 = Identity; Vector<3> v3 = project(m4[3]); With the library I was using, TooN 2.0.0 beta8, this resulted in a compile error. The error stated that when the vector returned from project() was being created, the compiler couldn’t invoke assign to a read only location. A simplified declaration of project() looks as … Continue reading

Posted in Programming | Leave a comment

Correcting Message Order with Courier

Recently I moved some local messages from my machine (previously downloaded with pop3) onto the server so I could use imap. I used Mail.app on Mac OS X 10.5.8 to do this. For some reason, the messages in this example were uploaded in a way that caused them to be loaded in the wrong order on iOS 5.0.1. Since I run the mailserver myself, I took a look at the message files to see if I could deduce the cause … Continue reading

Posted in General | Tagged , , | Leave a comment

Google Authenticator Backup Woes

Google Authenticator doesn’t backup on iOS; before erasing your old device, make sure to re-configure Google Authenticator on your new one. Continue reading

Posted in General | Tagged , | Leave a comment

Cubic Spline Interpolation

Cubic spline interpolation is a simple way to obtain a smooth curve from a set of discrete points (knots). It has both C1 (first derivative) and C2 (second derivative) continuity, enabling it to produce a continuous piecewise function given a set of data points. From the algorithm detailed here I have implemented a clamped cubic spline class in C++. It is templated on the type of X and Y, allowing for use of scalar or vector types. It requires only … Continue reading

Posted in Programming | Tagged , , , , | 1 Comment

Houses in Minecraft

So I’ve been playing Minecraft, focusing mainly on the creative aspect, although I play the new Beta client and run my own server locally so I get the features added post-classic. I’ve turned off monster spawning and set the difficulty to Peaceful, so I can focus on bringing creations to life instead of running from scary monsters in the night. The first time I played with monsters, I found the sound of a zombie’s “murrrrrrrr” in a dark, endless cavern … Continue reading

Posted in Programming | Tagged , , | 2 Comments

Time Machine Exclusions – Snow Leopard

A bit late, but here’s an update of the Time Machine exclusion list for Snow Leopard.

Posted in Leopard | Tagged , | Leave a comment

NSCopying and Mutability

In the Cocoa frameworks, it is common to find mutable and immutable versions of classes that store data, such as strings, dictionaries, and arrays. Most of these classes also implement the NSCopying informal protocol, and those with mutable varients implement the NSMutableCopying protocol. These protocols specify methods for obtaining immutable and mutable copies of an object. These copying methods should be implemented such that the copy can return an instance of a subclass, to allow for subclasses to copy their … Continue reading

Posted in Cocoa Yups and Nopes | Tagged , , , | 1 Comment

Readable If Statements

To kick of the Coding Yups and Nopes section, I’ll start with something simple. There are a set of things to do, and a set of things to avoid. For each thing, there are one or more reasons justifying its classification. These reasons are ordered by descending importance and increasing subjectivity. – Nope: if (condition) doWork(); else doOtherWork(); If you’re stepping through with a debugger (I used gdb), it is difficult to tell when stepping over the line if the … Continue reading

Posted in Coding Yups and Nopes | Tagged , , , , | Leave a comment

Window Resizing on Resolution Change

This post kicks off the “App Yups and Nopes” section in which I’ll post both good and bad things I see applications doing. This differs from the other Yups and Nopes sections in that it talkes specifically about observed application behavior. My intent is to show why a specific behavior is undesirable, then present a solution. In this situation, I connect my laptop to a projector to watch a movie. My screen resolution changes to match that of the projector. … Continue reading

Posted in App Yups and Nopes | Leave a comment