Thursday 20 December 2012

Christmas Tree Gift Tags, printable on A4 address labels (L7160)

A few years ago I forgot to buy Christmas gift tags. Fortunately I had some A4 address labels and a printer, so I made these.


If you'd like to try them you'll need some L7160 labels or similar (A4, 21 per sheet), an application that can read Word 2007 document (docx) format, and a printer.


PS. I can upload a PDF copy if anybody wants one, but the docx can be edited if you find the grid doesn't quite line up properly with your labels. I'd recommend printing on plain paper to check alignment first.


Tuesday 17 July 2012

Five important ITIL concepts you need to know

Our organisation is in the process of adopting some more-or-less ITIL-aligned processes. I think our scenario is pretty common: a long time ago, someone senior decided "we want some ITIL". A whole load of people got trained and took their Foundation exam, came back to their desks, carried on handling tickets in a system that calls incidents 'problems', and forgot most of what they'd learnt. Life went on. Some time later we bought a more ITIL-aligned toolset, and have been very slowly carefully implementing it over a number of months. (A large number of months.) People are adjusting to the new processes and terminology at different rates. Sometimes it gets pretty frustrating, but we're getting there.

I'm working my way towards ITIL Expert qualification and I spent some time on the project to bring on board the new toolset, so I've explained the difference between Incidents and Problems, or between Standard Changes and 'normal' Changes more times than I can recall. That pretty much makes me the go-to person for ITIL questions in my group.

So... a couple of weeks ago a colleague asked me for a quick summary of ITIL basics he needed to know. Luckily the conversation took place on Instant Messenger so I have a record of it. These were the points I came up with:
  1. ITIL Service Management is all about doing what the business needs, not slavishly following process for the hell of it.
  2. If nothing else, in an operations role, you need to have a really good grasp of Incident vs. Problem management and why separating them is helpful.
  3. Only manage stuff at a level of detail where the benefits exceed the cost of managing at that level.
  4. Question the value in everything (see points 1 and 3).
  5. Learn to think in terms of Services, not just products and technologies.
This is in the context of a Service Operations team; for other groups in IT the priorities might be very different. But for a list I came up with off the top of my head I'm quite pleased with it.

What do you think? Do you disagree? What would be your top five?

Wednesday 6 June 2012

Five years


My first post on this blog was five years ago today.

Apparently five years is my wooden anniversary. As a little wood-themed anniversary gift, here's something lovely:



Sunday 3 June 2012

Being TechieBird

I've been neglecting this blog for a long time now, and partly that's been due to indecision. I've known that I wanted to post on more topics, and for that the blog needed a new name. (And with hindsight, the blog name I chose back in 2007 really wasn't very good.)

At the same time, I supposed that TechieBird probably isn't the most serious and professional sounding moniker for a serious IT professional.

So a couple of nights ago I chose a new name for my Twitter account and for this blog. It's mostly irrelevant what it was because, when it came to clicking on the Save Changes button on Twitter, I couldn't bring myself to do it. It was only then that I realised how much I've become attached to this name and the badly-drawn pink bird that is my avatar.

Most of us want to be taken seriously in our careers, but if we have to hide our pink, feathered side* to do it then we lose a piece of ourselves.

So, in celebration of this small epiphany, I am happy to present my new domain name, techiebirdsnest.com.

Welcome to my nest.

*Those who know me would say I'm more beak and claws than pink feathers anyway. But you get the idea.

Thursday 31 May 2012

Powershell Script to Shuffle Albums in Windows Media Player

How I used Powershell to create playlists of random albums from my library, avoiding single tracks and allowing me to exclude the tracks I always skip.

It’s not polite to ask a techiebird her age, but I’ll tell you that I’m old enough that most of the music I’ve listened to has been albums, not singles. And many of my albums sound better as albums, i.e. played from start to finish in the order the artist intended.
Sometimes I don’t want to have to decide what to listen to. I just want to hear something good and I want to hear all of it. Or sometimes I just like the familiarity of a compilation playing the tracks in the order I expect. So it’s a shame there isn’t a “shuffle albums” feature in any media player hardware I’ve come across, or any of the major software media players.
However, we have PowerShell, Windows Media Player has an object model, and how hard can it be to create a playlist of complete albums anyway?
Actually, harder than I expected. But, helpfully, James O’Neill wrote about the quirks of the WMP Object Model some time ago, which helped a lot. (Definitely read his two posts on scripting for WMP if you’re thinking of doing something similar. They’re written for PowerShell v1 but everything works much the same.)
Anyway, here’s what I came up with (usual disclaimer applies):
   1: Function Shuffle-Albums

   2: {Param ([int]$NumberOfAlbums, [int]$MinTracks, [int]$MinStars=0)

   3:  

   4: write-host $NumberOfAlbums.tostring() "albums, containing at least" $MinTracks.tostring() "tracks rated at least" $MinStars.tostring() "/5"

   5:  

   6: #Set up objects

   7: $wmp=new-object -COM WMPlayer.ocx

   8: $all=$wmp.mediacollection

   9:  

  10: #Get the names of all the albums from the track attribute db

  11: $albs=$all.getAttributeStringCollection("Album","Audio")

  12: $Albums=@()

  13: $AlbumNames=@()

  14:  

  15: #Put the album names in an array

  16: for ($n=0;$n -lt $albs.count;$n++)

  17:     {$AlbumNames+=$albs.item($n)}

  18:  

  19: #Step through and put the tracks for each album in a temporary playlist

  20: $Albumnames | foreach {

  21:     $p=$all.getByAlbum($_)

  22:     if (($p.count -ge $MinTracks) -and ($_ -ne "")) {

  23:         $p.name = $_

  24:         $Albums+=$p

  25:         }

  26:     }

  27:  

  28: #Pick some random albums

  29: $AlbumSet=$Albums|get-random -count $NumberOfAlbums

  30:  

  31: $m=$wmp.mediacollection

  32:  

  33: #If we already created a playlist, delete it

  34: if($m.getbyname("Random albums").count -gt 0) {

  35:     For ($i=0;$i -lt $m.getbyname("Random albums").count;$i++) {

  36:         $r=$m.getbyname("Random albums").item($i)

  37:         $rURL=$r.sourceURL

  38:         $wmp.playlistcollection.remove($r)

  39:         remove-item $rURL

  40:     }

  41: }

  42:  

  43: #Create our new playlist

  44: $PlayList=$wmp.newPlaylist("Random albums","")

  45:  

  46: #Add all our songs to the new playlist, checking they meet the minimum star rating (or haven't been rated)

  47: $AlbumSet | foreach {

  48:     for ($t=0;$t -lt $_.count;$t++){

  49:         $s=$_.item($t)

  50:         if(($s.getItemInfo("UserRating") -gt $MinStars-1*25-13) -or $s.getItemInfo("UserRating") -eq 0) {

  51:             $Playlist.appendItem($s)

  52:         }

  53:     }

  54: }

  55:  

  56: "Added " + ($playlist.count).tostring() + " items to playlist" | out-host

  57:  

  58: #Write our playlist to a file

  59: $wmp.playlistcollection.importplaylist($Playlist) | out-null

  60:  

  61: #Pass back the filename (URL) of our playlist

  62: Write-Output $wmp.mediacollection.getbyname("Random albums").item(0).sourceurl

  63:  

  64: $wmp.close | Out-Null

  65: $wmp = $null | Out-Null

  66:     

  67: }

  68:  

  69: $url=$null

  70: $url=Shuffle-Albums 10 6 3

  71:  

  72: "Playlist saved as " + ($url).tostring() | out-host

  73:  

  74: while ((Get-Item $url).length -le 250) {start-sleep -seconds 5}

  75:  

  76: $Player=new-object -COM WMPlayer.ocx

  77: $Player.openPlayer($url)
Most of the work is done by the function Shuffle-Albums, which takes the following parameters:
NumberOfAlbums How many albums to add to the playlist
MinTracks The minimum number of tracks for an album to be considered ‘complete’. (I have singles and other miscellaneous tracks which have album information in WMP, and the database doesn’t have anything to distinguish these from complete albums. This seemed like the easiest way to avoid having one-track ‘albums’ in my playlist.
MinStars Counter to my argument for having an album shuffler in the first place, some albums have one or two sucky tracks I prefer to skip over. This parameter gives me the option of giving those tracks a low rating and having them missed out from my playlist. Most of my tracks are unrated, so those always get included.
So the line $url=Shuffle-Albums 10 6 3 will return a URL (file path) to a playlist of 10 albums, each containing 6 tracks or more, skipping any tracks rated with fewer than 3 stars.
I’d quite like to put a UI on this but realistically I may never get round to it. If anyone else wants to have a go then I’m very happy for you to use my code as long as you share the results for free :)
And as always, please let me know in the comments if you spot anything I could fix to make the code better.

Monday 30 April 2012

Wi-fi tethering HTC Desire to Kindle

A few months ago I switched my old Kindle 3 (the one with 3G and a keyboard) for a new, smaller Wi-fi Kindle. Mostly I don’t miss the 3G, but for the odd occasion where I’m impatient to download a book and I’m not near a wi-fi hotspot, it’s nice to have the option of tethering to my mobile phone for a few minutes.

Kindle is all picky about where it gets its Wi-fi, and will only connect to a hotspot in Infrastructure mode. Most tethering apps for mobile phones work in Peer-to-peer mode, which is no use for connecting a Kindle, so it took me a while to find anything that worked.

Here’s what I’m using on my rooted HTC Desire (GSM) running CyanogenMod 7.

Software: Android WiFi Tether

Settings:

  • Device Profile: Google NexusOne
  • Setup Method: Netd (master)
  • WiFi driver reload: on

If you have a similar setup, hopefully this will save you some trial and error.

Creative Commons License This work by TechieBird is licensed under a Creative Commons Attribution-No Derivative Works 2.0 UK: England & Wales License.