News for hackers. Stuff that matters.
Re:Mac Mini colocation by sailormoon on Saturday February 20, 2010 @04:59AM (#1138878)
I had an app that needed to take snapshots of web pages, and the client was very picky about the image quality. OSX exposes WebKit in such a way that I could get very nice snapshots, and I could never get anything close on Linux so a mac was the tool of choice. It sat there doing absolutely nothing besides running a web service that would occasionally take a pic of a web page and hand it back to the real linux server, and it did that fine for a long time.

I think the main issue I had was with software update. Apple provides an interactive command line interface to their update program so you could write some scripts to do it but in practise I just did it manually every once in a while. A couple of times it didn't reboot cleanly and got stuck on a firmware update or something so a manual power cycle was in order.

I also had a couple of weird problems where the machine would become unresponsive if it hadn't been rebooted for a long time. Never really got to the bottom of that but it would be something to consider if you were going to use them "seriously".

Re:Mac Mini colocation by petercooper on Saturday February 20, 2010 @01:46PM (#1139259)
I'm probably going to rig up a colocated Mac Mini to do exactly the same thing. I asked around on Twitter if other people were interested in chipping in to share the service and people were keen.

There's a business opportunity here. The existing screenshot services are mostly slow (I want my imgs within a minute, ideally - not 10+), hideous quality or use browsers on operating systems with shoddy rendering.

As it is, I think I can max out a Mac Mini to producing around 500-700k screenshots a day and lease a Mac Mini with the required hosting for ~$130 a month, so the costs divide down quite nicely.

Re:Mac Mini colocation by sailormoon on Sunday February 21, 2010 @12:54AM (#1140213)
There's a business opportunity here.

You reckon? I have to admit I didn't even think of that. I wouldn't have thought people would pay for screenshots, but then again I didn't think people would pay to send emails, either. This was part of a value added service, sadly it never really got off the ground.

Shall I send you an email telling you more about what was envisaged? Maybe we can cooperate.

Re:Mac Mini colocation by vog on Saturday February 20, 2010 @05:37AM (#1138899)
WebKit is part of Qt and thus available for any platform.

Or did I miss something?

Re:Mac Mini colocation by blasdel on Saturday February 20, 2010 @05:51AM (#1138909)
The Qt version (and Chrome's version) uses the platform to do the font rendering, which on everything but OS X and Windows would be freetype.

If the client wanted Apple's particular font rendering, they'd have to use their version of Webkit. The least-shitty way to do that is to write a Webkit app for OS X (there's also the Windows version of Safari, but that would involve a lot of bullshit)

Re:Mac Mini colocation by sailormoon on Saturday February 20, 2010 @06:01AM (#1138914)
Yep, that's exactly it.

Didn't even have to write an app - I used this excellent tool: http://www.paulhammond.org/webkit2png/

Re:Mac Mini colocation by sailormoon on Saturday February 20, 2010 @05:57AM (#1138911)
Undoubtedly it was I who missed something! It just came down to "well, I have a working script right here for mac, or I can spend the next days/weeks/maybe never trying to get it working and looking nice on linux".

I guess people don't hear "we went with the mac to save money" too often but in this case, that's what it was.

But even so - I generally don't much like linux's font rendering. Doing it on mac meant that the images looked beautiful, basically exactly like Safari, which was to the client's (and my) taste.