Imperial to Metric Converter Bookmarklet

My wife bakes a lot of delicious things, and is always trying out new recipes from the internet. Trouble is, most US recipes only provide ancient non-metric measurements like ounces or gallons or bushels or hands or whatever. To save her time, I wrote this little javascript bookmarklet. One click and it converts imperial measurements into metric ones.

Drag it to your bookmark bar, and avoid any Imperial entanglements.

Convert to Metric

Alternatively if you use a touch device like an ipad, you can add this page as a bookmark, then copy the text from the textarea below, edit your bookmark and paste this in place of the URL.

PS: Check back for updates! I'll be adding more conversions soon!

Posted in everything else

Firefly SCUMM

This is something I've been working on for a while. An imaginary SCUMM point and click adventure based around Firefly.

Mal and Shepherd Book

Inara

UPDATE:

Added a few more, hope you enjoy em!

Mal. Bad. In The Latin

Kaylee

Posted in everything else

The Woodtiq – a DIY cintiq graphics tablet

This is my second attempt at a homemade cintiq. The first was a crazy mix of external monitors, Infrared pens and wiimotes held aloft by PVC pipe. You can see the fruits of that build here http://www.instructables.com/id/DIY-Cintiq-Tablet-using-Wii-Remote, although its long since been taken to pieces.

(Note: this is a copy of the original posting I made on Bongofish forums, although I've edited it very slightly. You can find the original post here: http://forum.bongofish.co.uk/index.php?topic=2013.0)

The second, more recent attempt is called the Woodtiq. The Woodtiq is named for the first island featured on Monkey Island 2 ("Woodtick"). I started with an old Advent 7091 Laptop which I inherited from a friend. It had suffered a coke spillage, but I replaced the keyboard and cleaned the motherboard and got it all working again. I already had a laptop so it sat idle for a while. Then I loaned it to another friend, who used it for about a year before buying a machine of his own. Eventually, it made it's way back to me.

In the mean time, I had gotten my hands on a second-hand Intuos 4L, and was determined to make a go of a homebrew cintiq again. I'm pretty bad at working with wood, as you can see from the following photos. I've made things as simple as I can. I'm just happy it actually all fitted together the first time.

I started by stripping the laptop back to its barest components, leaving the motherboard assembly with harddrive, RAM, CPU, Heatsink etc. I took all plastics off, disconnected the keyboard and trackpad, took the LCD panel apart and disconnected the LCD cable from the back, which thankfully gave me a lot of length to play around with.

Next, I measured out the dimensions needed and cut a piece of wood to serve as the base. I used leftovers to make two sets of angled 'struts' to hold the intuos in place, then staggered them and fixed them to the the board, with screws from underneath.

The backplate from the laptop is mounted to the board, and the motherboard is mounted to that.

Rather than try and run a short cable from the back ports to the the intuos I chose to run a full length one, through the inside from the ports on the left

The Intuos sits down into the first set of slats, leaving room for the perspex overlay on top.

I stuck the LCD down onto the intuous with black duct tape, all around.

A sheet of perspex covers the entire unit, resting on the outer struts. Screws hold this in place.

Despite my awful record with wood, the build feels tight, and I can carry it around under one arm. It's obviously not finished. At the moment, the perspex covers the touch wheel and controls for the panel. I had planned to cut out a groove using a dremel, but I'm leaning towards using a shorter overlay which only reaches the edge of the LCD. This means moving the left side support struts around to the front and back, but I don't think that'll be a problem.

Thoughts / Ideas
- I think I might replace the perspex with a sheet of glass, which I can get locally for about €10
- I'm not confident that those wooden struts will hold up to repeated screwing/unscrewing, so ideally I'd like to replace them with something metal and use nuts and bolts to hold the glass in place.
- Leaving the back and sides open is great for cooling, but long-term it's a bad idea. I'll have to cover the back and sides somehow, maybe with perspex.
- I had to remove the keyboard and trackpad from the laptop, but I still have them, and they still work. I'd love to fit them in somewhere but the cables don't reach anywhere but the middle of the unit. If I could extend them, I could put a trackpad on the left side under the intuous controls
- also considering remove the wood which remains underneath the leftmost edge after I relocate the struts, although this would prevent me adding a trackpad in future like I just suggested.
- I've spent any free time which I would normally use to draw building this thing instead, so I really need to get back into doing some art work soon before I completely forget how.

UPDATE: October 13th, 2011

Made some updates last night. As planned, I moved the struts around the side, trimmed the perspex back and also put motherboard risers into the wood struts to both raise the panel slightly and combat wear and tear on every time I have to remove the overlay.

Risers

Tagged with: , , ,
Posted in diy

GroupPhoto – a photo grouping tool


I've just written a little app that groups bunches of photos together into subfolders, based on dates. Basically, it looks for photos which were taken within 90 minutes of each other (or however long the user specifys) and creates subfolders for them. That's it. Took about 20 minutes to write and put the UI on it. Here it is.

You can control the sensitivity by telling GroupPhoto the timespan and minimum group size.

Before I realised that 'group size' was required, I accidentally separated a folder of 900 images into about 120 subfolders. I then wrote an 'undo' feature which actually takes a folder and merges the contents of any folders within that folder. This doesn't act recursively - it only affects the level directly under the folder you choose, and no subfolders of those folders. Could be useful in it's own right.

http://roryok.com/apps/GroupPhoto/GroupPhoto.exe

Things You Need To Know:

  • Based on WPF/XAML so it requires .NET 3.5 Framework or higher - you can get that here
  • That's it!

UPDATE:
Got some feedback, and it turns out GroupPhoto has one or two bugs - not least that it doesn't run on 64-bit machines. I've decided to re-write the whole thing in an earlier version of .NET and skip the whole WPF thing entirely. I'm hoping to re-release it shortly but realistically I'm super duper busy right now

Tagged with: , , ,
Posted in software

Fifa 13

Using computer modelling software I've been able to predict the cover for next year's Fifa game :

Posted in everything else, games

Hermes – The Regex File Mover / Renamer

Last year I found myself faced with the mammoth task of renaming and sorting thousands of files according to a strict set of rules. I couldn't find a piece of software to do exactly what I needed, so I wrote one. Hermes (named after futurama bureaucrat and legendary sorter hermes conrad) is a regex based file sorting application. It allows you to change the path of a file (which covers both moving and renaming) based on regex criteria.


Say for instance you have a folder full of images of paintings by famous artists. These are all in the same folder, and it's getting a little out of hand trying to sort them all. You started out with a neat naming convention
c:\art\Hieronymus Bosch - The Garden of Earthly Delights.png
c:\art\John Everett Millais - Ophelia.JPG
c:\art\Leonardo Da Vinci - Mona Lisa.gif
But now things are getting out of hand, and you want to sort them alphabetically by LAST name, not first. Then you decide you would like to group each artist's paintings into their own folder. Then you decide it would be best to group the image formats into different sub folders too. Now, you could easily rename all the files using a program like AntRenamer, or Albert Bertilsson's wonderful RenamerNG (my favourite), but how would you go about creating the folders for each artist?


That's where Hermes comes in. Hermes allows you to use Regular Expressions to alter the path of the files, which covers both moving AND renaming at the same time. Hermes would do the job above by using a RegEx string like
c:\Art\([A-Za-z0-9\.\&]+) ([A-Za-z0-9\.\&]+) - ([A-Za-z0-9\& ]+).([A-Za-z]+)$
and turning it into
c:\art\$2, $1\$4\$3.$4

As you can see from the screenshot the app is not very complete - still using the default Visual Studio icon for instance - but it does do what it's supposed to do, and does it fairly well. I'm working on an upgraded version but for now if anyone really needs it, download it here:

http://roryok.com/apps/Hermes/Hermes.v0.1.zip

Things You Need To Know:

  • It requires .NET 3.5 Framework or higher, you can get that here
  • It starts by default in C:\ and with Regex (.*) and recursive UNTICKED. If you tick recursive and hit process, it will iterate over every single file on your C:\ drive, which could take hours, so don't do that. Use the recursive feature carefully!
  • I accept no responsibility for any loss of data as a result of using this program. Use it at your own risk and for feck sake make some backups first. I would. Even if it works flawlessly, it's very easy to get your regex messed up and tell it do rename all your files to something random. Be CAREFUL!

PS: The screenshot is from an older build that was still called RegexFileMover - the version for download is called Hermes but I'm too lazy to change that.

Tagged with: ,
Posted in software

Further evidence that Microsoft is broken

Below is a screenshot of a warning popping up in visual studio, complete with a 'short' url

What's wrong with this helpful looking message?

  1. The link is inside a tooltip, which vanishes when you no longer mouse over the link. in other words, that hyperlink cannot be clicked at all #FAIL
  2. In a world full of link shorteners, http://go.microsoft.com/fwlink/?linkid=14202 is NOT a short link. #FAIL
  3. opening the warnings and clicking on 'Show error Help' does not redirect to this link. Instead, it brings you to help about that type of error. #FAIL
  4. Typing the handy 44 character short URL into my browser brings up a page with System.NET buried in collapsed content, linked by an anchor tag that doesn't work. System.Net.IPAddress is not mentioned at all. #FAIL
  5. If you want to get picky, the text of the warning is presented in both single and double quotes. At the same time, and neither are appropriate here. #FAIL

This is the latest version of Visual Studio 2010, running on Windows 7. There are no legacy problems at work here. Five failures inside the design of a simple error message, inside one of the companies flagship products, no doubt designed and re-designed by a team of crack software developers and designers.  I guess the ability to actually click on a link that appears on the screen is not a design priority for them. And as for what's at the other end of the link, hey - that's another team's problem right?

Tagged with: , , ,
Posted in things_that_suck

Clickable, Hoverable ExCanvas World Map

I was trawling through some old stuff recently and I found some useful javascript I'd created for a project that was never used. The requirement was to replace a flash based map component with something iPad friendly. I found an amazing plugin by Jon Combe called ExCanvas which rendered an entire zoomable, colourable world map through canvas. However, it didn't fit all the needs of the project - we needed the ability to add tooltips.

I spent a couple of hours adding in code to generate an imagemap from the same coords which the canvas uses. This imagemap creates hover states for all the countries on the map.

hello world

The hacks, in brief:

  • added a countryNames array to the .js file
  • added a hoverable imagemap which implements the countryNames array
  • added some predefined zoom zones for regions like europe, north america, asia, pacific etc

Here's a working example so you can see what I mean.

Never did get to use this, but it would be a shame to see it get deleted in some file cleanup, so I thought I'd better post it.

Tagged with: , , ,
Posted in webdev

Meteor Suck

Here's the text of a complaint email I sent to Meteor, maybe I was a little harsh but I'm having a bad day:


------------------------------------

Dear Meteor


At least once a week I can't login to webtext because it tells me I have the wrong password. I re-enter it CAREFULLY numerous  times and it doesn't work until I get to the captcha. That's the first problem. The second problem is that every time I click web text I get a javascript error that says "Error 0 occurred processing" in a javascript alert box.


javascript alert box. Lets think about that for a minute. Anytime this nonsense error occurs, I have to click to get rid of it. In order for it not to come up, all you have to do is NOT call


alert("Error 0 has occured")


which is somewhere in your code. In fact, I'll tell you exactly where:


https://www.mymeteor.ie/mymeteorapi/model/javascript/ajaxLibrary_1_4.js, line 75.


That entire file is completely redundant by the way, as you can do ajax requests using JQuery, which is already called at the top of the page along with early_load.js and register.js, (which, it turns out, are two copies of the same file).


I'm paying you guys €35 quid a month for a service which already has awful signal coverage and barely passable 3G. Whatever eejits you have running your website, I must be a bigger one for staying with your network.

Tagged with: , , , ,
Posted in everything else

International Forestry Fund

I got an email from a friend that a swiss company called the International Forestry Fund, chaired by none other than our own Bertie Ahern, was making a bid for Coillte, Irelands national forestry management agency. I decided to take a peek at the website, and I found it very interesting, not to mention entertaining.
The first page has a popup with a 'Terms and Conditions' you must agree to in order to view the site. This is something very rare on the internet, and rightly so. I decided I'd better read these 'Terms and Conditions' before agreeing. Here are a few.
The information on this website is directed only at persons or corporate entities who are entitled under the laws of the jurisdiction in which they reside/operate to view information in relation to the International Forestry Fund which is a British Virgin Islands registered company. Information contained in this website is provided for shareholders in the Company and for their exclusive use and benefit. Users of this website must not distribute any material contained in this website to others.
Whoops. I just broke the last part. Lucky I hadn't agreed to it yet. Now, when I see that this company is registered in the British Virgin Islands, alarm bells start going off...
If you choose to access this website, you do so at your own risk and the Company will not be liable for any breach of local law or regulation that you commit as a result of doing so.
Wow. Ok.
This website is designed to provide information about the Company, and its investment manager, Helvetia Wealth A.G. (the “Manager”) which is general in nature and you should not rely on it for any particular purpose.
Should not rely on it for ANY purpose? really? Ok Two more bits, then I'm done:
Severability
No part of these terms and conditions is intended to constitute an exclusion of liability which cannot be excluded under Guernsey law. To the extent that any part of these terms and conditions is found to be invalid, unlawful or unenforceable such part shall be severed from the remaining terms and conditions, all of which shall remain in force and effect.
Guernsey? I thought this company was a British Virgin Islands registered company?
Governing law
These terms and conditions shall be governed by, and interpreted in accordance with, British Virgin Islands law. You irrevocably agree that the courts of the British Virgin Islands shall have exclusive jurisdiction to resolve any dispute or claim of whatever nature arising out of or relating to this website, and that the laws of the British Virgin Islands shall govern such dispute or claim.
Oh. It's back to being a BVI company. I guess that was just a glitch in the matrix. I wouldn't trust these guys as far as I could throw a freshly felled pine tree.

Organising the sell-off of our national forests is exactly the kind of thing I'd expect Bertie to be involved in, and while Cowen is still steering the country into a ditch I would fully expect him to help his old pal do it. If you have a minute, please sign this petition.

http://www.thepetitionsite.com/2/help-save-irelands-forests/

If you're like me you're probably quite cynical about petitions and their effectiveness, but it can't hurt. Besides, right now there's nothing we can do about this.

Posted in everything else