Posts

Using the new Windows 10 ssh client with TortoiseHg

After a little trial and error I got TortoiseHg to successfully use the ssh client that is now built into Windows 10. It's nice because it doesn't require conversion of your private key to ppk format - as plink required - so you can use a standard id_rsa file (easy if you're using *nix as well as Windows). It does not provide a GUI prompt for encrypted keys - it's looking to stdin for the password, which it will never receive, so unfortunately you'll need a plain-text private key. Put your decrypted private key in /Users/yourname/.ssh  and use the following command line in your TortoiseHg settings -> Sync -> SSH Command: C:\Windows\System32\OpenSSH\ssh.exe -2 I'm also exploring the use of the ssh-agent ... currently thwarted by the fact that this service simply won't run.

Using an Async Iterator in Typescript

I have been experimenting with async iterators in Typescript. One area these could be useful is in simplifying the code for forms, specifically handling button presses. Currently, I create forms programmatically using my form class, which creates Bootstrap modal forms. "Action buttons" are the buttons that sit in the modal-footer area. When creating "ActionButton"s to add to the form an onClick handler is specified and the form takes care of calling onClick() when the button is clicked. Here's a trivial example - an About box with an Ok button and second button just for testing. export function about(): void {   let aboutBox = new forms.Form( `About ${app.productName}` );   aboutBox.addButton(   {     name: 'Ok',     onClick: ()=>     {       aboutBox.close();     }   } );   aboutBox.addButton(   {     name: 'Test',     tooltip: 'Test ...

Windows FILETIME to Javascript Date

In case you ever care about this ... /**    * fileTimeToDate()    *    * Convert a Windows FILETIME to a Javascript Date    *    * @param {number} fileTime - the number of 100ns    * intervals since January 1, 1601 (UTC)    * @returns {Date}    **/   function fileTimeToDate( fileTime ) {    return new Date ( fileTime / 10000 - 11644473600000 );   };

How Corpse Bride was made.

Jonathan Lucas Unveils His Editing Secrets on 'Corpse Bride,' the First Stop-Motion Animation Feature. Previously the article was found here: http://www.editorsguild.com/newsletter/JulAug05/julaug05_bride.html However that link is dead - the article is now here: https://www.editorsguild.com/Magazine.cfm?ArticleID=110

Localised Date & Time in Javascript

I want to display a date & time string that's formatted correctly depending on the viewer's locale. Question: can I rely on the javascript Date object's locale-specific string functions ? Answer: yes, but only if I don't care what it looks like or how many characters are in the string. Here's the result of my testing: toLocaleString() FF15:     "Tue Jul 14 14:37:05 2009" Chrome21: "Tue Jul 14 2009 14:37:05 GMT+1200 (NZST)" Safari6:   "14 July 2009 2:37:05 PM NZST" IE10:   "Tuesday, 14 July 2009 2:37:05 p.m." toLocalDateString() + ' ' + toLocaleTimeString() FF15:     "07/14/2009 14:37:05" Chrome21:   "Tuesday, July 14, 2009 14:37:05" Safari6: "14 July 2009 2:37:05 PM NZST" IE10 "Tuesday, 14 July 2009 2:37:05 p.m." Could they be any more different ?

Canon dissing Mac users

Dear Canon - Fuck you, could you possibly be more inept ? Not only have you failed to supply OS X Lion drivers for my Canon printer (CP400), or in fact ANY printer from that range (the otherwise awesome dye sublimation range of printers) - but your webpage "Mac OS X Lion Compatibility List", provided explicitly for Mac users, DOESN'T FUCKING WORK IN SAFARI. Honestly, could you care any less about Mac users? So, here's my promise; I will no longer buy Canon print products until there's at least a hint of caring a damn. When was Lion release ... was it about 10 months ago now ... and you would have had dev builds months before that ... so, do you have more than just the one Mac developer ?

Do NOT use the Flickr uploader in Aperture 3.01

Image
What a fuckin' disaster - Apple you bunch of twits ! Aperture 3 is a step forward in many ways but the Flickr uploader that comes built in was clearly the work of the junior member of the Aperture dev team. Oh, this will be easy, let's give it to Joe - he has no experience but it's only a bloody file uploader he can't screw it up too badly. Wrong. Joe fucked it up !!  So, having selected an image to upload, I click the Flickr button in the tool bar - the tooltip for the button is "New Flickr Album". It creates an Album in my Aperture Library which it synchronizes with Flickr. Great - the image uploaded. However, if I then modify the image metadata in Flickr itself (which is what I would normally do) - like give the image a new name - it get's out of synch with the Flickr Album in Aperture and the image disappears from the album. Ok, I think to myself. I'll name the image version in Aperture, and set the keywords in Aperture too - great, these things ...

Scripted use of HandBrake to re-encode video

My workflow for importing media from my cameras reflects the fact that video is just as important to me as still images, and beginning to dominate in terms of storage needs. Which is saying a lot considering that I have a Canon 5D Mk2 and take a lot of RAW images which are over 30MB each. Video originates mainly from my family's 2 point & shoot cameras - a Canon Powershot TX1, and my new (awesome summer camera) Canon D10, and to a lesser degree from the 5D Mk2. Generally, the video is generally not particularly high quality - it's family orientated stuff that we really want to keep but doesn't need to be, for example, a 1080p 40Mb/s stream. So, I want to re-encode the footage to reduce my storage needs. In the case of video from the point & shoot cameras - I am well served by the "Universal" preset available in HandBrake (yes, I have an AppleTV), i.e. there' no noticeable quality loss but often storage is only 1/3 of the original. For footage from t...

Defeating Geo-Defence "Rabbit Hole"

Image
For those you you who love the iPhone game Geo-Defense, here's my defeat of the "Rabbit Hole" level.

One day, long, long ago ...

One day, long, long ago, there lived a woman who did not whine, nag, or bitch. But it was a long time ago, and it was just that one day. The End

Creamoata

I was very sad to read recently about the demise of Flemings Creamoata , a long time staple of any civilized breakfast table. I loved the Fine Ground Creamoata - porridge made with it had the consistency of pudding - smooth & creamy. Anyway I wrote to Nestle and asked for the “recipe“ and was pleased to receive a reply the same day - with details of how to make my own Creamoata - thanks Danielle from Customer Services ! ”Recipe“ is not quite the right word as it turns out, since Creamoata is just Rolled Oats that has been milled to a fine consistency - so more like ”Processing Instructions“. Here are the instructions: Medium Ground Creamoata Place Rolled Oats in a food processor and process on highest speed for approximately 4 minutes. Fine Ground Creamoata Place Rolled Oats in a food processor and process on highest speed for approximately 8 minutes. Easy eh? Don’t fill the food processor more than about 1/2 full. Here’s my favorite recipe for preparing Creamoata oats for breakfas...

USB versus Firewire

I am kind of annoyed by this Macworld UK article:  USB 2.0 hard drives The author, Rosemary Haworth, says of Firewire support:  "You’ll pay more for this feature, and many people won’t need it, given the advantages of USB 2.0 over the dreadfully slow USB 1.1 standard.". I think you've done some people a disservice Rosemary, by not telling them about the advantages of Firewire, which are more subtle than just bus speed. When reading or writing to a Firewire drive you'll find that the CPU is very lightly loaded compared with USB. This is because the CPU is heavily involved in USB data transfers, but with Firewire it is different. The Firewire disks can directly transfer data into memory without CPU supervision (the CPU asks for the data transfer and then is free to do other work while the Firewire hardware takes care of the transfer - at the end of the transfer the CPU is notified). Who cares you might ask ? Well, here's an example of where Firewire is important: Yo...

Playing "Hunt the dialog" in Leopard

The "Spaces" virtual desktop feature of Mac OS X 10.5.2 Leopard, is great - but far from perfect. Have you ever played "hunt the dialog" ? This game is played upon you when you use Spaces. Here's what happens: An application, that is in a different Space than the one you are currently using, alerts you by bouncing in the dock. You click it, and are whisked away to the right space. However, the app looks kind of odd - you can't detect why immediately but it soon becomes clear that the app doesn't have focus. Somewhere else is a dialog, from this app, that should be on top, but is in a different Space. Well, where is it? If you are really unlucky it is behind another app in a different space - finding these really sucks. If you are lucky it will be visible in another space. Usually, as soon as you click it, you automatically switch back to the correct Space (the one that the originating App is in) - and can then interact with it. Spaces needs some polish...

More reasons why US Healthcare system is busted

http://www.reuters.com/article/newsOne/idUSN0836117620080508 The US government needs to procure health care for it's elderly and disabled citizens. In actual fact, the US government can't procure health care per se, it can only procure health care insurance - and I presume it's fairly basic cover which is why folks can choose to upgrade (at their expense) to Medicare Advantage. What is immediately clear, is that Health Care delivery is first and foremost a for-profit system with all of the middle men a large multi-tier commercial system needs. There are salesmen knocking on doors seeking to sell you Health Care, and these guys want to get paid. The insurance companies need to make a profit, so do Hospitals and local clinics. How much of the actual Health Care budget (from all payers; individuals, companies & government agencies) actually buys a health care service or product ? Is it even 50% ? So, we pay a premium for Health Care (in order to create profits for provider...

Maxda CX-9 minor issues

I have a Mazda CX-9 which I am mostly pretty happy with. The following constitute "niggles" which just kind of annoy me ... The Cruise Control disengages if you use the turn indicator. Clearly, this misguided "safety feature" was designed by someone who has either never used an Interstate freeway, or perhaps was an intern at Mazda and was subsequently transferred into the Accounts department. The lock for the rear electric window-controls also locks out the driver. Perhaps Mazda doesn't realize that this is a "child safety feature" and not a "driver safety feature". I should be able to lock-out my kids from operating the rear windows - but still be able to operate them myself. The rear window controls, if operated, prevent the driver control (for the same window) from working - even if the lock is engaged. Scenario: My 5 year old daughter wants me to leave the window down - and she knows that if she just leaves her finger on the button, I ca...

Itunes Smart Playlist boolean-OR

Have you ever wanted to create an iTunes Smart Playlist that included the boolean OR operator ? Well it’s easy right? You just have the rule “Match any of the following rules...”. But this isn’t what I want at all. This simplistic approach only works for simple unions. What if you want do do something a wee bit more complex - like a playlist that contains music that is rated between 1 and 5 stars from both the Rock and Alternative genres ? Unfortunately, the only way I know to achieve this requires two playlists. Playlist one creates the union, call this playlist “Rock & Alternative”: Match any of the following rules ... Genre contains Rock Genre contains Alternative Playlist two operates on playlist 1: Match all of the following rules ... Playlist is “Rock & Alternative” Rating is in the range 1 to 5 Easy eh?