Posts

Trying out auto-mounting network shares with AppleScript

I wanted a neater way of auto-mounting network shares on startup than simply sticking the path in Login items so I thought I'd search around and see what methods were available. I finally settled on using a bit of AppleScript to first check if the mount point exists and, if not, to attempt to mount the network share. 1 2 3 4 5 6 7 8 9 tell application "Finder" if not (exists POSIX file "/Volumes/Data" ) then try mount volume "afp://some-server.local/Data" end try else display dialog "Already Mounted" end if end tell Given that I wanted to mount multiple shares, putting the above in a function seemed like the way to go. Unfortunately, no matter what I tried, passing the path to Finder as a variable caused the test to always fail - even though though the path could be displayed via dialog as well as appearing in the AppleScript Editor's Events box. After finally giving up on that, I switched ...

Setting up my new router lab

Image
After putting in a new shelf and tidying up my network gear a week ago - as seen below - it was time to organize the Cisco routers I'd picked up off eBay during the week. First thing to do was add the extra WICs I'd bought (WIC-1Ts as they could be had for around $15, whereas 2Ts started at $30). The 2821 - maxed out spec-wise and already running IOS 15.1 - came with no WICs at all, while I chose one of the 2600-series to be 'piggy-in-the-middle', so to speak, and it now has two serial cards. And that was that. The 3 routers are now sitting on the trolley I picked up a couple weeks back (much cheaper than a wheeled-rack; easily movable/adjustable). Above them the switch setup is starting to take shape with the two 3550s that just came in the post. I'll add the 2950 I already have and hopefully a couple more - either more 3550s or perhaps a 2960 or two. With 4 or more I should be able to setup some decent LACP, PAgP and STP scenarios, along with L3 ro...

Testing out Link Aggregation

Image
I picked up a TP-Link managed switch last week as something of a compromise between affordability and features - as it turns out though, it does just about everything I could ask for, just without the extra expense from buying something that has HP or Cisco written on the side. I grabbed the TL-SG3216, a fanless L2 managed switch with 16x1Gigabit ports as it ticked all the boxes: Silent (fanless) Managed Link Aggregation/802.3ad (LACP) 802.1Q (VLAN) STP As a bonus, the CLI interface (via console cable or ssh) is very similar to Cisco's IOS, so I don't have to learn an entirely new syntax to configure it. Before I replace my existing switch, I spent a bit of time testing out its features. First up, I setup a spare Raspberry Pi with a second ethernet interface (via a USB dongle) to test out link aggregation. First up, the configuration on the Pi (Raspbian): Install ifenslave to allow for the creation of bonded network interfaces # apt-get install ifenslav...

Twilight games at the SCG sure are pretty

Image
Good overview of the game from the top of the Victor Trumper Stand; a solid win; and the weather was kind - the forecast late afternoon rain didn't eventuate, instead giving way to a balmy Autumn evening. The edge of the CBD makes for a nice backdrop to the Members' stands

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.