January 2012
3 posts
2 tags
Fix missing eth0 after changing network cards
After changing hard drives out of one server machine into another and booting, the network interface didn’t come up correctly. eth0 didn’t exist and gave an error when I tried to start it manually using ifup eth0. At first I suspected that the correct driver module wasn’t installed because the OS had been installed on another system with a different NIC; so I verified that the...
Jan 23rd
12 notes
2 tags
Restore the Linux console messages on boot
When I installed Ubuntu Lucid on a physical server for the first time I was unnerved by seeing a startup progress indicator when I’m used to seeing all the console messages scrolling by. If something is taking a long time, I want to see what it is. I know you can switch to VT-7, but I want them back on the main screen where they’re easy to see (and easy for someone else to see if...
Jan 23rd
3 tags
Installing 32 bit PostgreSQL on 64 bit Linux
During an emergency server upgrade last week I was faced with a problem. I’d installed 64 bit Linux to replace a 32 bit Linux box, copied across the PostgreSQL data directory, then installed the identical version of PostgreSQL, but 64 bit. It turns out that the data file format is incompatible between 32 and 64 bit PostgreSQL. PostgreSQL is my favourite RDBMS, but it’s worth noting...
Jan 23rd
6 notes
December 2011
2 posts
1 tag
Charles 3.6.5 released
Charles 3.6.5 was released earlier today. It’s primarily a bug fix release. For Java 1.7 a number of incompatibilities were fixed including a delay during startup and hung network connections. Fixes for a networking regression in 3.6.4 - an improvement to the networking caused an irregular Connection reset (or similar) error to occur when browsing. SSL behaviour improved including better...
Dec 7th
48 notes
1 tag
Recovering lost Git commits
If you rollback to a previous commit you can lose the later commits if they’re not referenced by another branch. I just rolled back and lost a commit that I hadn’t pushed to the remote. Easy fix. git reflog This will show you recent commits, and should include the commit that you’ve just lost. You can then merge it back in.
Dec 6th
3 notes
November 2011
9 posts
1 tag
Migrating from SVN to Git
I’ve migrated several projects from SVN to Git in the last couple of weeks. In doing so I’ve worked out a little process that has seen me right in preserving all of the history. This process relies on the git-svn tool, which you may need to install as a separate package. 1) Create an authors.txt file. This is a file that maps the SVN usernames to the more verbose Git author names. I...
Nov 29th
2 tags
EGit fails to import an existing Git working copy
I used another Git tool to clone my git repository into my development directory, which is also my workspace directory in Eclipse. I then wanted to add this working copy as a project in Eclipse; it has a .project file as it’s already an Eclipse project (previously in an SVN repository). Using the File > Import menu option and choosing Projects from Git, I was able to add my Git...
Nov 29th
2 tags
Optimising images / Optimizing images
Tomato tomato. If you’re putting images into an application, especially a mobile application, or on the web, or anywhere, it’s a good idea to optimise them before you deploy. In an iOS application the larger your application is the longer it takes to download and install. If you go over the magic 20MB limit, users aren’t even allowed to download it over 3G; they have to seek out...
Nov 25th
3 notes
1 tag
The coolest thing ever
It’s fair to say that when you enter the office, it is criminal not to have a short intro theme blasted out on the stereo for all to enjoy. What an entrance. It sets the tone. It sets the mood. And the ladies love it. Fortunately, thanks to a confluence of technology, we blew this case wide open last week at Cactuslab. We now have the DHCP server running a script when known devices join the...
Nov 25th
7 notes
1 tag
Charles 3.6.4
Charles 3.6.4 was released this week. It includes a number of bug fixes which are outlined in the version history. If you had trouble with Charles sometimes starting with a blank window, or freezing while using breakpoints, this might be the bug fix release for you. If you are interested in the HAR import/export capabilities, this is definitely the release for you. I also want to draw attention...
Nov 15th
45 notes
1 tag
Charles 3.6.4 and HAR (HTTP Archive)
Charles 3.6.4 is another minor update to the 3.6 release; it features a large number of bug fixes, including several improvements to the HAR import/export implementation. We introduced HAR import/export to Charles 3.6 and it has just gotten better (or really, in the case of the bugs, less broken). Thanks to everyone who has corresponded with me about particular issues (especially Alex Selivanov). ...
Nov 15th
32 notes
2 tags
Fix a sticky iPhone home button
I’ve had a sticky home button on my old iPhone 4 for many months. It wouldn’t consistently double-tap to bring up the multitasking menu, and it caused me to develop a deadly pincer-grip that made my new 4S squeal. Yesterday, by chance, I saw my friend Tim Haines tweet about taking his wife’s iPhone into an Apple Store, where the genius went mad on the home button with an alcohol...
Nov 13th
2 notes
1 tag
High bandwidth high latency performance tuning
We recently upgraded our office Internet connection to 20Mbps fibre. Interestingly, for local traffic we were seeing excellent speeds, but international connections were disappointing (1 - 3 Mbps). In NZ we have quite a high ping to the US (where we’re primarily connecting to), and this requires a high TCP window size to be able to have sufficient data in the pipe to take advantage of...
Nov 13th
2 tags
iOS 5: turn off multiple message reminders
When I hear my phone beep I read the message on the lock screen and then put it back in my pocket. I don’t need it to beep again. After upgrading to iOS 5 it’s a bit harder to find where to turn the multiple message reminders off. To turn off multiple message reminders (iMessage) on iOS 5 open the Settings app. Choose Notifications. Scroll down and choose Messages. Scroll down and...
Nov 11th
2 notes
October 2011
1 post
New blog
I’ve consolidated my old blog and my oldest blog into one new blog. I may post more often. I’ll definitely, maybe, post Charles Proxy release notes. I’ll sometimes post tips and tricks so that I can find them again.
Oct 29th
July 2011
1 post
1 tag
Debugging Core Data SQL on iOS
You can pass a launch argument to your application from Xcode to enable debugging of SQL statements and Core Data timing to the console log. In Xcode 4, edit your Schemes. Go to the Run phase, Arguments tab, and in the Arguments Passed On Launch area add: -com.apple.CoreData.SQLDebug 1 You can tick this on and off as you like so you don’t have to delete it and won’t have to remember it!
Jul 26th
May 2011
1 post
1 tag
Italy →
joshuabrown: Check out the book I just published of my recent trip out to Italy. Every photo was shot on the iPhone 4 using Camera+. Get it here http://campl.us/
May 3rd
March 2011
1 post
1 tag
PostgreSQL sizes of tables
select tablename, pg_size_pretty(pg_relation_size(tablename)) as data, pg_size_pretty(pg_total_relation_size(tablename)) as total from (select tablename from pg_tables where schemaname = current_schema()) as foo order by pg_total_relation_size(tablename) desc;
Mar 7th
7 notes
November 2010
3 posts
1 tag
Flickruppa • iPhoto export to Flickr. Simplified. →
darren131: If you use iPhoto 8+ and Flickr then you should check out this awesome plugin.  Allows for simple export from iPhoto to Flickr (including EXIF, background uploading, GPS location, videos, sets, etc, etc, etc…) Brought to you by the same madman who built Charles, Birdbrain, Mobile Fotos, etc
Nov 9th
1 tag
Simulate memory warnings on the iPhone
When debugging on the simulator you can simulate a memory warning in your code by using the Simulate Memory Warning option in the Hardware menu. But on the device it isn’t so easy, but it’s really important to have thoroughly tested your application in the presence of memory warnings. What I do is add some code to my App Delegate to periodically send a memory warning automatically. Usually every...
Nov 6th
1 tag
Warnings for API calls that won't work in iOS 3
When you build for iOS 4 you don’t get warnings for API calls that don’t exist in iOS 3 so it can be hard to see when it’s going to crash. In order to get warnings for that usage you can edit /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/include/AvailabilityInternal.h, you have to update that URL for the appropriate SDK version, and this is only for the...
Nov 5th
September 2010
2 posts
1 tag
Chicken Palomino
My oldest and only recipe. First devised 11th December 2002. Ingredients Chicken thighs 2 onions 3 bay leaves 3 cloves 2 star anise 3 green cardamons 1 cinnamon stick Tumeric Coriander Red wine Kalamata olives Red chilli Tin of whole peeled tomotoes 6 mushrooms Sea salt Basmati rice Method Defrost chicken thighs. Fry 2 onions in olive oil. Add 3 bay leaves, 3 cloves, 2 star...
Sep 28th
1 tag
iMovie won't start and uses 100% CPU
After using the Migration Assistant to move onto my new Mac my iMovie wouldn’t start. Clicking the icon made it bounce then it would stop and appear to not be running, but was actually running and consuming 100% CPU. To fix I removed Perian, ran iMovie, then reinstalled Perian - something must have become busted up in the migration. I’ve also read reports of other people having problems with other...
Sep 25th
June 2010
3 posts
1 tag
Installing Dimdim on Debian Lenny
I found these instructions for installing DimDim on Debian Lenny. They’re pretty good: http://niteshrijal.com.np/installing-dimdim-in-debian-lenny-stable/ However, there appear to be existing packages for some of the Python modules that are installed from source, so perhaps try those first. Also when setting permissions, look out for the commands to set permissions on your /usr/bin and /usr/lib...
Jun 21st
1 tag
Slow networking to host computer from Debian in...
After installing Debian Lenny in Microsoft Virtual PC I tried to copy files from my Windows desktop to the virtual PC by SCP/SFTP and by mounting the drive using Samba. The copy speeds were very slow and errors showed up on eth0 when running ifconfig. This appears to be a problem when sharing the network adapter between the virtual machine and real machine. Accessing network resources on a...
Jun 21st
1 tag
Installing Debian Lenny on Windows Virtual PC
Create a new Virtual Machine, put the Debian Lenny CD in the drive, boot the machine. It should boot from the CD. At the Install prompt press TAB to edit the Install command. Just before the vga= argument add a noreplace-paravirt argument, then change vga=normal to vga=791. Then press Enter to boot. I got these instructions from http://wiki.debian.org/MicrosoftVirtualPc2007/lenny You’ll need to...
Jun 21st
April 2010
1 post
Apr 22nd
March 2010
1 post
Mar 25th
December 2009
1 post
1 tag
Charles v3.5.1 released
Happy New Year everyone! A small bug fix release for Charles, tidying up two bugs that were discovered in the 3.5 release. These include a fault in the Repeat Advanced tool, where it would fail after a number of requests, and a fault in the Auto Save tool where it wouldn’t save the “Enable on startup” setting. Download Charles 3.5.1
Dec 31st
6 notes
1 tag
Charles v3.5 released
Charles v3.5 is now available, just in time for Christmas. It contains a number of significant new features, enhancements and bug fixes. They’re all detailed on the version history page. The UI has been improved again and is now looking sensible on Windows 7 (thanks to an update from JGoodies) and better on Mac OS X (thanks to Quaqua, and some work getting rid of duplicate borders)....
Dec 22nd
6 notes
November 2009
5 posts
Nov 14th
Tumbularity
Tumblarity: 4 How long before I get to #1?
Nov 13th
Nov 13th
Nov 13th
Nov 13th
October 2009
1 post
1 tag
Charles v3.4.1 released
This is a minor feature and bug fix release. Firstly, it fixes the regression bug in v3.4 that broke request body editing in Breakpoints. Thanks to everyone that reported and tested that for me - your help is most appreciated. Secondly, it replaces the functionality that you could paste a full URL into the Location form. It works even better now, as you’ll see, and there are warnings if you...
Oct 16th
6 notes
September 2009
1 post
1 tag
Charles v3.4 released
After six months of development I’ve released Charles v3.4. This version features major SSL changes improvements including: You must now explicitly turn on SSL proxying on a per-site basis. This is to prevent confusion and problems with Charles’s SSL certificates, and also to save users from accidentally violating their own privacy by recording unwanted SSL communication inside...
Sep 26th
2 notes
May 2009
2 posts
May 9th
May 8th
March 2009
3 posts
1 tag
Charles v3.4b1 featuring SSL improvements
Charles v3.4 is in the works. I haven’t settled on a final feature list for this yet; my focus is intended to be UI improvements, but I couldn’t resist releasing some new SSL features. So this isn’t really a beta, but I’m calling it 3.4b1. Charles now supports client-side SSL certificates, so you can authenticate with servers that require them. You must configure Charles...
Mar 29th
2 notes
1 tag
RomanNumeralFormat
Several years ago I wrote this RomanNumeralFormat class which extends java.text.NumberFormat but parses and formats Roman numerals. I just stumbled across it and thought it belonged here. This sort of thing should definitely be included in Java 7, then it will truly rule over Perl 6. import java.text.FieldPosition; import java.text.NumberFormat; import java.text.ParseException; import...
Mar 15th
1 tag
iTunes App Store promotion
Half a year on from the launch of the iTunes App Store, one of the biggest difficulties for developers is getting noticed amongst the 10,000+ apps. We’ve talked about traditional marketing; we’re trying new forms of marketing (twitter, social networking), but mostly agree that promotion within the App Store itself is the golden ticket. I’ve had this idea rolling around for some...
Mar 1st
February 2009
5 posts
1 tag
Charles v3.3 released
I’ve released Charles v3.3 today. This release adds several new and exciting features including: HTML, CSS & RSS/Atom validation XML export formats JSONP support I’ve blogged previously about these, and other new features, so I’m just going to link through to those! Read the first announcement and the second announcement. The next release of Charles will focus on...
Feb 14th
1 tag
iPhone cannot play video over 3G
We just tracked down an issue where H.264 video would play on the iPhone over WiFi but not over 3G. The problem turned out to be that the server emitted a Vary: User-Agent header as part of its mod_deflate handling. That header alone was causing the video to fail to play over 3G. I suspect that it may have been a problem on the 3G network itself rather than the iPhone. If you have similar...
Feb 8th
1 tag
Charles v3.3 public beta 2
The second public beta of Charles has just been released. This update adds: “Window always on top” setting and window remembers maximised state Summary table column sorting improved to sort numeric columns Map Remote can now map http requests to https servers Location matching now supports adding $ after the final / for an exact directory match rather than an implicit wildcard It...
Feb 8th
1 tag
iPhone OS 2.2.1, UITableViewCell and...
As of OS 2.2 there was a problem with UITextAlignmentCenter and UITableViewCells where the text would always show left aligned. The easiest solution was to compile your application for OS 2.0, if you weren’t using any new API features, in which case the original behaviour continued to work. However as of OS 2.2.1 it appears that this no longer works! There were some proposed solutions but...
Feb 7th
1 tag
Debian Sarge to Lenny upgrade
This morning I have upgraded a non-production but important server from Debian Sarge to Debian Lenny. Figuring it was about time that I did the upgrade I took some advice that Lenny is very stable and could buy me a longer support period by skipping Etch altogether. Time will tell. This post itemises the steps I went through for posterity and prosperity if I ever need to refer to them again....
Feb 5th
December 2008
1 post
1 tag
Charles v3.3 public beta
Hi all. Happy holidays! I’ve put the finishing touches on some new features for Charles: Validation of Markup (HTML/XHTML), RSS / Atom & CSS XML import/export format for recorded sessions JSONP support Download Charles v3.3 b1 Validation is a really exciting addition for web developers. If you’re trying to build valid HTML / XHTML pages (and the accompanying CSS and RSS/Atom...
Dec 29th
September 2008
1 post
1 tag
Charles 3.2.2 released
A small bug fix release to Charles after a few quiet months. I’ve been a bit distracted with family and iPhone apps! This release includes various minor bug fixes, which you read about. New features include remembering whether you use Structure or Sequence view, support for large files (>2GB) and binding reverse proxies and port forwardings to specific IP addresses on the local machine. ...
Sep 6th
March 2008
2 posts
1 tag
Charles 3.2 released
Happy Easter! Charles 3.2 has been released today. There are lots of new features so I’ll cover a few of the highlights. You can read the full version history for the whole list. Breakpoints let you interactively change requests or responses as they pass through Charles. This opens up whole new opportunities for debugging and testing your applications. Throttling has been enhanced to allow...
Mar 23rd