Tuesday, 24 January 2012

Time Machine on a network drive

Stephen Morley has provided instructions on setting up a non-Apple network drive to work with Time Machine.

Apple’s Time Machine software made it easy to setting up incremental back-ups, with one exception: network drives (more formally called network-attached storage, or NAS). Time Machine only directly supports drives formatted with Apple’s HFS+J file system, and will eventually use all disk space on the drive. This page provides an illustrated guide showing how to set up Time Machine on a network drive, using a sparse bundle to emulate a smaller HFS+J drive.

00:42 in Hacking, MacOS X | Permalink | Comments (0) | View blog reactions

Thursday, 19 May 2011

My first Processing program: algorithmically-generated plant

I have been meaning to try out Processing (a.k.a. Proce55ing) for ages, now.  Processing is a Java-like language which includes a simple development environment which makes generating graphics, animation, and sound simple. You can see some impressive examples at the Processing site's exhibition page.

I played with Processing for the past week or so, and my first non-trivial "sketch" is a modification of the Penrose Tile example written by Geraldine Sarmiento included with Processing. It is an algorithmically-generated plantlike form. The iterative method used is called an L-System, introduced by the botanist Aristid Lindenmayer (hence the "L"). 

Back in the 80s, when fractals, cellular automata, and other iterative and recursive things were the rage, this beautiful book (which I have a copy of) was produced: The Algorithmic Beauty of Plants, by Przemyslaw Prusinkiewicz and Aristid Lindenmayer.  It is out of print, but you can download a full high-resolution copy at that link, which also lists correction.

Click here for my sketch.

23:17 in Art, Hacking, Science | Permalink | Comments (0) | View blog reactions

Saturday, 12 March 2011

Python tip

One I have been guilty of:

Also, beware of writing "if x" when you really mean "if x is not None" -- e.g. when testing whether a variable or argument that defaults to one was set to some other value. The other value might have a type (such as a container) that could be false in a boolean context!

From the Style Guide for Python Code.

14:04 in Hacking | Permalink | Comments (0) | View blog reactions

Sunday, 05 December 2010

How to build a Hackintosh

Lifehacker has updated their Hackintosh build guide. Unfortunately, the some of the hardware listed (including the CPU) is no longer available at Newegg.

17:29 in Hacking, MacOS X | Permalink | Comments (0) | View blog reactions

Saturday, 06 March 2010

Injecting Javascript with Privoxy

I’ve been wondering how to use Privoxy to inject Javascript into specific sites, as a way of doing some Greasemonkey-like things for non-Firefox browsers.

This article on fixing Facebook for Konqueror provides a way, assuming the site in question has a global .js file. Basically, you redirect the URL for the .js file to a local copy, and then you may be able to inject your script into that local copy.

I haven’t tried it, yet, but will be playing with it presently.

17:56 in Hacking | Permalink | Comments (0) | View blog reactions

Tuesday, 10 November 2009

Google enticing more developers

A couple of recent developments with Google. Firstly, they have released their Javascript tools, collectively called Closure (not to be confused with Clojure). Secondly, they have released a Creative Commons-licensed compiled language called Go (watch the teaser video below).


I haven’t had time to play with either of these tools. It’s nice to see that Go can be compiled for Mac OS X (my platform of choice).

23:18 in Hacking | Permalink | Comments (0) | View blog reactions

Thursday, 01 October 2009

Minor CueCat hacking

I bought a CueCat from LibraryThing to make it easier to scan my books. However, by default, it outputs some weird encoding. This is OK for use with LibraryThing, since they can decode the CueCat output. However, not so great with Delicious Library, which can’t.

Fortunately, they must have gotten enough questions about it and they posted a simple solution. Basically, disconnect pin 5 of one of the chips on the circuit board. Beats the more complex solutions for some of the older models. And it works like a charm.

Anyway, what’s a bit ironic is that I got one of these for free right when they first came out. It was a promo with Wired magazine. I think I threw it away. It used a PS/2 interface rather than USB, anyway.

23:30 in Books, Hacking | Permalink | Comments (0) | View blog reactions

Tuesday, 16 June 2009

How Google Chrome stores passwords

Well, I’ve been a bit hesitant to save passwords when using Google Chrome because it does not ask for a “Master Password” like Firefox does. So, I didn’t know if it encrypted the stored passwords, or if it did encrypt them, where it got the encryption key from. Then I found this article which looks at the source code for Chrome on Windows to see that it uses a Windows system call to encrypt the password using the user’s Windows password. Nice.

Which means that this is one component that they have to keep re-writing on various platforms to use whatever is native. Which is probably why Mozilla went with their own scheme.

09:34 in Hacking | Permalink | Comments (0) | View blog reactions

Wednesday, 17 December 2008

Python 3.0

Wow, I’ve really been out of the loop. My favorite language, Python, is now up to release 3.0. From the release notes: “Python 3.0 (a.k.a. "Python 3000" or "Py3k") is a new version of the language that is incompatible with the 2.x line of releases.”

Technorati Tags: , , ,

22:56 in Hacking | Permalink | Comments (0) | View blog reactions

Wednesday, 03 September 2008

Rip and encode

So, I got frustrated at the awkwardness of ripping a CD to MP3 on Linux (Fedora in particular), so I wrote this little Python script. It rips the current CD to the current directory using cdda2wav, and then calls LAME to encode to MP3, naming the files by track number and name. Requires: cdda2wav, LAME, and Python. Python and cdda2wav are available in the standard Fedora distribution. You will have to get LAME elsewhere, or download the source and build it yourself.

Geek out.

Technorati Tags: , , , , , ,

20:00 in Hacking | Permalink | Comments (0) | View blog reactions