Archive for the ‘Opensource’ Category

How I prepare expense reports

Its been traditional since the old days to stick receipts on a sheet of paper and have them represent entries into an expense report. I think the only time this differed was at Sun – there we just stuffed it all into an envelope without any order and someone presumably went through all of them and figured out their own sane order.

Recently I had to scan about 70 pages worth of receipts (yes, imagine the expense value). My scanner creates some rather huge images (at 300dpi, with some 4128×2480 pixels), which average anywhere between 3-12MB per page for one JPG image. The scans to PDFs don’t make sense because I can’t concatenate PDFs the way I can JPG images (and the sheet feeder only handles about 15 or so sheets at once, reliably — its very easy to get paper jams when you have staples and loose paper).

Total size for everything? 300MB. A little hard to attach to an email. So I whipped out trusty ImageMagick (easily installable on MacOSX via homebrew — brew install imagemagick). ImageMagick wouldn’t install due to a conflict with pkg-config from Mono, and since I don’t use Mono any longer I trashed that.

Then it was as simple as:

ls -1 *.jpg | sed "s/\(.*\)\.jpg/\1.jpg \1_thumb.jpg/" | xargs -n 2 convert -resize 1024 -quality 70

What does that do? It simply finds all JPG files, then it saves thumbnails with a _thumb, and it uses convert (from ImageMagick) to resize it to 1024 pixels with only about 70% quality. This reduced the 300MB tome to something like 10MB!

How do I generate PDFs? Simply open all the thumbnails (open -a Preview *_thumb.jpg) and then do a Print to PDF from Preview.

Voila, all expense receipts are generated and ready for emailing. I typically like to keep attachments below 20MB in size because most mail systems reject it after that.

Bitbucket does git

I’ve been a paying Github customer for quite some time. I like having private repositories. I didn’t realise that Bitbucket was purchased by Atlassian, and more interestingly, they’re now offering Git support.

For me, this beats the pants off Github. There might be more community at Github (cue: how Sourceforge is sort of dying), and I’m not ditching Github, but I’m definitely realising I can save money from now on (Github’s cheapest plans start at $7/month for private repos).

So how does Bitbucket compare in terms of pricing? 5 free users for private repositories. Unlimited public/private repositories. If I hit more than 5, the next 5 users cost $2/month each ($10/month for 10 users). Clear win.

Bitbucket also has a migration tool on the Web that allows you to import repositories. It didn’t take much work for me, and I’ve just cancelled my Github subscription. I’m not cancelling my Github account because whatever is public still works… but for private stuff, Bitbucket seems to be the winner.

Nitobi acquired by Adobe; PhoneGap to be ASF

I tweeted on October 1 about how I thought PhoneGap Build was cool. Its an immensely cool service which I’ve wanted to see MoSync do.

On October 2 I just read that PhoneGap was being submitted to the Apache Software Foundation (article, mailing list post). I absolutely loved the commitment, their current license was already good, and I was very excited for Nitobi.

Just yesterday on October 3, Nitobi announced that they entered into an acquisition agreement with Adobe. PhoneGap Build will be closed-source, commercial, and cost money. DreamWeaver CS 5.5 has PhoneGap. However PhoneGap itself will remain open, and will become Apache Callback.

Kudos to Nitobi. Kudos to Adobe. You’re making the right decision. Just don’t screw it up.

Nitobi is pursuing a contribution of the PhoneGap code to the Apache Software Foundation (ASF) to ensure open stewardship of the project over the long term. As part of that process it will be renamed to a new Apache-branded name Callback. Adobe fully supports this contribution and will continue to host the PhoneGap community site with full participation from its contributors, as well as the PhoneGap Build service. — on why PhoneGap code is being donated to the ASF


i