Posts

Showing posts from 2014

Day of the Tentacle Special Edition

Image
I was initially super-keen on the idea of a Day of the Tentacle remake/special edition , but it's already pretty much perfect - distinctive look, voice acting that fits perfectly, a brilliant soundtrack. So, maybe just leave it in peace? That said, I'm sure I'll end up playing it anyway - I love DotT to bits, after all. Now, as for Grim Fandango, that needed a bit of a control scheme overhaul so the new edition of that could really come out well.

jQuery can be unbelievably handy and concise

Adding selectable table rows in jQuery The short bit of jQuery consists of the following: Adds a .click() function to any tr elements inside a tbody element to toggle the addition of the selected class whenever a row is clicked. Next, another .click() to give a link with the ID selectAll the ability to toggle all rows at once. Finally, one more .click() attached to the ID clearSelected that will deselect any rows currently selected. In this case any tr elements inside a tbody element are selected, but this could be refined using IDs or Classes if there are multiple tables on the page. $( document ).ready( function () { $( 'tbody tr' ).click( function () { $( this ).toggleClass( 'selected' ); }); $( '#selectAll' ).click( function () { $( 'tbody tr' ).toggleClass( 'selected' ); }); $( '#clearSelected' ).click( function () { $( 'tbody tr' ).removeClass( ...

This NUC is absolutely tiny

Image
This thing is bloody tiny, a really tidy little package. Of course, I can't find a screwdriver small enough to remove the tiny screws securing the 2.5" bracket so I'm stuck for the moment until I work out where my Jewelers' screwdrivers are... [Edit] I'm an absolute muppet. The SSD just slides in from the front, no need to unscrew anything. I'll put this down to either too much or too little coffee this morning. Yeesh.

New toys to play with over the weekend

Image
Some new gear to play with, just in time for what looks to be a wet weekend. The MicroServer isn't actually new; it's just been sitting on my floor for a couple weeks waiting for me to order more RAM so it can actually do, you know, anything. The NUC is going to be a Home Theater PC - normally, I'd be sticking Debian on it without a second though but I want to run the Foxtel Go app on it and that means Windows. Oh well. On the upside, if the NUC works out as the new HTPC, that frees up the Mac Mini that's currently doing that job.

Photos from 2014 International Ice Hockey Australia

Image
For the record  Team USA prevailed 5-4 over Team Canada in OT after coming back from being 0-2 down in the first period. Just like last year it was a really good night, complete with the sort of over-the-top production that you'd expect. The first of many fights breaks out. At one stage it was standing room only in the penalty boxes...   Going into OT USA scores the winning goal and goes nuts celebrating while being buried in streamers.

Word of the Day

ul·ti·mo /ˈəltəˌmō/ adjective dated adjective: ultimo ; symbol: ult. ; symbol: ulto of last month. "the 3rd ultimo" Origin: from Latin ultimo mense ‘in the last month.’ Doesn't it just add so much to a sentence? Replacing, for example, "The 27th of last month" with "The 27th Ultimo" lends a touch of class. Or something close to class, at any rate...

Notable quotable

"It is the mark of an educated mind to be able to entertain a thought without accepting it." - Aristotle Amen, brother...

Retrieving values from XML with PowerShell

Image
This PowerShell script looks up  and returns results from a mini-database that uses XML as its back-end. For the actual program that edits and returns results graphically, I used Java - this was an exercise in learning PowerShell's XML functions. As can be seen below, the in-built XML handling makes working with XML files very straightforward indeed. The structure of the XML file I'm using to test is: <?xml version="1.0" encoding="UTF-8"?> <recordList>     <record id="0">         <title>Some Title</title>         <category>Some Cat</category>         <notes>Some Notes</notes>     </record>     <record id="1">         <title>Great Expectations</title>         <category>Categorical</category> ...

Ups and Downs of moving house

Image
An upside of moving house: lovely new view. And a downside: boxes of stuff everywhere...

Heading down the coast

Image
I was uncharitably thinking it would be hard to take a nice shot of Ulladulla, but the harbor looks quite nice here: By contrast, it was starting to look a little murky in Batemans Bay though:

Mixed weather

Image
Mixed weather over Killalea this morning; still damned pretty though.

Bulk Extension Renamer - bash

Image
As a quick counter-point to my earlier PowerShell script , here's my equivalent in bash: 1: #!/bin/bash 2: 3: if [ $# -lt 2 ]; then 4: echo -e "\e[33mUsage: $0 <current extension> <new extension>\e[0m" 5: exit 1 6: fi 7: 8: for fileName in *.$1; do 9: newFileName=${fileName/.$1/.$2} 10: if [ -f "$newFileName" ]; then 11: echo -e "\e[31mNot renaming \e[1m$fileName\e[22m to \e[1m$newFileName\e[22m -- File exists." 12: elif [ -d "$newFileName" ]; then 13: echo -e "\e[31mNot renaming \e[1m$fileName\e[22m to \e[1m$newFileName\e[22m -- Is a directory." 14: else 15: if [ -w "$fileName" ]; then 16: mv "$fileName" "$newFileName" 17: echo -e "\e[1;32m$fileName\e[22m renamed to \e[1m$newFileName\e[0m" 18: else 19: ...

Change the ComputerName value in Unattend.xml using PowerShell

A quick and dirty PowerShell script to update the value of ComputerName in Unattend.xml before imaging. This particular value is located at: <unattend>  <settings pass="generalize">   <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">     <computername> Which is a bit of a mouthful, but we can be lazy and just pull the value from the nth component node (in my case it's 3, or the 4th component node). PowerShell uses dots to describe the hierarchical path, which looks a lot neater than the above: $xml.unattend.settings.component[3].computername To repeat, the value of .component[n] will change depending on the structure of the file. The value of the...

Customized Windows PE 5.0

Image
A quick run-through covering creating a customized Windows PE bootable drive, mainly so I don't space out and forget any of the steps (*ahem* again). The below is based on the Deployment and Imaging tools available by installing Windows ADK 8.1 Create Windows PE files Run Deployment and Imaging Tools Environment as Administrator Create the base structure with copype command: copype <architecture> <directory> Example for 64 bit: copype amd64 c:\winpe64 Example for 32 bit: copype x86 c:\winpe32 Paths to packages amd64: \Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs x86: \Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs Mount boot.wim (assuming current path is the root of WinPE, e.g., c:\winpe) dism /mount-wim /wimfile:media\sources\boot.wim /index:1 /mountdir:mount Adding Key Packages (as...

Bulk File Extension Renamer - PowerShell

Image
Here's a quick PowerShell script to change the extension on a group of matching files, posted chiefly to illustrate how much more concise PowerShell can be when compared to VBScript (I'll post an equivalent script shortly). The script below is still about twice the length of the a similar script I wrote in bash for *nix but it's certainly an improvement in both length and readability over VBS. First up, grab the required parameters (old extension, new extension) from the command line. If either or both are missing, the user will be prompted to enter them. Each parameter is set with three options - [parameter(Mandatory = $true)] makes the parameter mandator. ValidateNotNullorEmpty is called to do exactly what it says on the tin.   [string]$oldExt puts the value of the parameter into a string called $oldExt . 1: param( 2: [parameter(Mandatory = $true)] 3: [ValidateNotNullOrEmpty()] 4: [string]$oldExt, 5: [parameter(Mandatory = $tru...

Not a bad background for a morning

Image
The view from my overnight digs made a very pleasant background for breakfast/coffee o'clock this morning. Loved the silence most of all - buried in the bush between Tathra and Bega. Not that the interior was anything to sneeze at... You just have to love off-peak rates that make places like this affordable for a simple business trip :)

Quote for the day

"I have so little that is fanciful or poetical about my own individu [sic] that I must trick out my dwelling with something fantastical otherwise the Coerulean Nymphs and swains will hold me nothing worth." - Sir Walter Scott

Photos from Game 2 of the MLB 2014 Opening Series at the SCG

Image
The seats were pretty good - in the shade, gave a decent overview of the game and provided a great side-on view of the homer in the bottom of the 9th.

Sydney Derby 2014-03-08: 3-1 to the Boys in Blue!

Image
Assembling for the march to the ground. In fine voice as usual. Awesome to see a giant throng of Sky Blue marching down Foveaux Street! At the ground, not long after kickoff. This was the closest thing to an in-focus shot I took inside the stadium. Far too much excitement going on in the Cove to be constantly pulling out the phone anyway.

Photos from away trip - Sydney FC @ CC Mariners - 2014-03-01

Image
Flying sauce bottle? Sure, why not... Warming up next to the bloody sauce bottles. The traveling Cove; with the Brisbane Water in the background The sparsely populated home end. They did have a brass section though.