Category Archives: Programming

Algorithms, Snippets, Bugs, etc.

Using Core Data’s automatic migrations to update data

It’s not brilliantly efficient but it does reuse existing importing code and it does work reliably and well.  If I update the app to include new recipes I only want to include them once.  When the app is first launched … Continue reading

Posted in Chef's Book, Programming | Tagged , , , | 2 Comments

Ownership of user created content.

I want to implement some concept of ownership/authorship in Chef’s Book.  Not for any reason of control but as a way of letting users swap recipes without data loss or unnecessary duplicates.  The problem is if I email a recipe … Continue reading

Posted in Chef's Book, Programming | Tagged , , | Comments Off on Ownership of user created content.

Whilst the mac is away we play with android.

Seeing as my mac is temporarily indisposed seeing as it no longer charges from the magsafe connector I’ve been fiddling with android/eclipse getting a rudimentary chef book app running there. I must say the layout of interfaces comes as a … Continue reading

Posted in Programming | Tagged , | 1 Comment

A small script hacked up to monitor directories.

This is something I knocked up a while ago just to keep an eye on a directory structure for permissions changes, excluding upload directories and other things: #!/bin/bash ignore[0]=”./public_html/blog/wp-content/uploads” ignore[1]=”./bb-attachments” cd unset unsecure i i=0 while IFS= read -r -d … Continue reading

Posted in Programming | Tagged , | Comments Off on A small script hacked up to monitor directories.

Application Accepted!

Well that was quite smooth, the application is now in the App Store Right Here!. In other news it appears I’d completely forgotten in my rush to get the site live to include LV partitions for the site and it’s … Continue reading

Posted in Chef's Book, LVM, Miscellany, Programming | Comments Off on Application Accepted!

Application Submitted!

Well actually it was submitted last Friday, but with the announcement of the iPad 2 and everything else I’m not expecting it to go live this week. Suffice to say I’ll be posting a store link or page link here … Continue reading

Posted in Miscellany, Programming | Tagged , , | Comments Off on Application Submitted!

DynDNS.org + Bash + Router == A tiny bit safer.

Pondering how to lock down a few bits to just an IP or two I hacked together this awful bit of bash: #!/bin/bash function valid_ip() { local ip=$1 local stat=1 if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then OIFS=$IFS IFS=’.’ ip=($ip) … Continue reading

Posted in Programming | Tagged , , | 1 Comment

Whilst deciding what to include with the App, we write a PDF generator!

Managed to implement rendering of recipes into multipage PDF documents. They look something like this: Lasagne Recipe One thing to note whilst writing the code was the usual inverted co-ordinates. I wanted an image in the top left, title and … Continue reading

Posted in Programming | Tagged , , , , | Comments Off on Whilst deciding what to include with the App, we write a PDF generator!

Nearing release, implement shiny things whilst waiting.

As the project nears release my thoughts turn to what will be needed in the near future and how best to solve an intermittent bug that’s present now. The bug was resolving by doing something I should have done ages … Continue reading

Posted in Programming | Tagged , , , , , , | Comments Off on Nearing release, implement shiny things whilst waiting.

Want to backup files in windows the linux way?

Download this cwRsync. Which is rsync packaged up for windows, and create a small script like this to run as administrator: @ECHO OFF SETLOCAL REM ** CUSTOMIZE ** Specify where to find rsync and related files (C:\CWRSYNC) SET CWRSYNCHOME=”c:\Program Files … Continue reading

Posted in Programming | Tagged , , , , | Comments Off on Want to backup files in windows the linux way?