Sam Rayner

Hi, I’m Sam. I design and build apps for iOS and the web. I live in Sheffield, UK and play Ultimate far too much. You can reach me via email or on Twitter.

Statto - The Ultimate stats tracker

I don’t really blog about Ultimate Frisbee but when I’m not looking at a screen it’s what I’ll be out doing or at least thinking about.

For the past two years I’ve had the privilege of representing Great Britain, competing in the Mixed division at the European and World Championships. I also coach and captain the local club team, Sheffield Steal and help coach Sheffield’s university teams.

Ultimate is growing rapidly in popularity and recognition as a sport. With that growth has come an increasing desire for advanced statistical analysis to gain a better insight into player performance and team strategies.

It will be many years before Ultimate has the funding for the kind of GPS player tracking of more mainstream sports. In the meantime, I’ve developed an app for the iPhone and iPad to allow coaches, broadcasters and fans to track and analyse Ultimate stats. It’s called Statto and is available on the App Store.

Try it out today for free, or for more information visit the website.

GitHub Spectacles

At Terracoding we regularly review pull requests from each other when working on a project. GitHub’s “Commits” and “Files Changed” tabs make it pretty painless but we wanted a way to easily view Ruby implementation files alongside their specs.

Octoclark Kentocat

I created a bookmarklet to arrange the file pairs 2-up for review. With the files side-by-side it’s easy to spot code that isn’t covered by tests and we get a better idea of what methods are meant to do. It also hides the code of deleted files which I never bother to read during review.

To install, drag this button into your bookmarks bar:

GitHub Spectacles

Try it out on this commit. Just click the bookmark when viewing the file changes.

The CoffeeScript for the bookmarklet is opensourced on GitHub.

Alfred Lyrics Search Workflow

Ever had the lyrics of a song stuck in your head but can’t for the life of you remember the artist or title? I get it all the time so wrote this Alfred workflow to search my iTunes library and start playing the first match it finds.

Download Lyrics Search

Get Lyrical

To get it working with your music collection you’ll need to make sure all of your tracks have lyrics downloaded for them. Don’t panic though, a great little Mac app called Get Lyrical can automate the process, tagging songs you select or tagging in the background as you play them.

Once your library is tagged with lyrics, install the workflow and type sing followed by the lyrics.

Under The Hood

For those interested in the technical side, the Workflow is just an Applescript:

on normalize(theString)
  --trim everything but letters and numbers
  return do shell script "echo " & quoted form of theString & " | tr '\r' ' ' | sed 's/[^[:space:][:alnum:]]//g'"
end normalize

tell application "iTunes"
  set theQuery to my normalize("{query}")
  --playlist 1 should be your whole music library
  set theTracks to tracks of library playlist 1
  set match to ""
  repeat with i from 1 to number of items in theTracks
    set theTrack to item i of theTracks
    set theLyrics to my normalize(lyrics of theTrack)
    if theQuery is in theLyrics then
      set match to (artist of theTrack & " - " & name of theTrack)
      exit repeat
    end if
  end repeat
  if match is not "" then
    play theTrack
    get match
    get "No match found"
  end if
end tell

You’ll notice that it runs through your entire library in alphabetical order. Unfortunately, if the song you’re looking for is by ZZ Top the search is going to be a hell of a lot slower than if it were by ABBA.

Also, lyrical clichés like “oh baby” or “tell me why” are likely to produce a match earlier than you expect so try to search for longer or less common phrases.1

If anyone has suggestions for improvements please let me know. I like the simplicity of the script so don’t plan to produce a playlist of search results or anything like that but feel free to use the Applescript as a starting point for your own script!

  1. It’s actually pretty fun to guess at lyrics and see what songs they appear in. If a search for “hands in the air” or “in da club” return in less than 10 seconds your iTunes may be due a clear-out.

Name & Shame

Name and Shame screenshot

A couple of days ago my first iOS app went up on the App Store! Name & Shame is an iPhone app for logging and sharing the funny, dumb (or even profound!) things your friends say.

“David Cameron… didn’t he direct Avatar?” – Erwann Cordon (being quizzed on his general knowledge)

It’s free to try out and just 99¢ or 69p to upgrade for unlimited quotations. You can import friends from Facebook and Contacts, share quotes on Twitter and Facebook, star your favourites, tag, search and more!

“…but cats CAN get married!” – Sarah Harrison

The idea came from sitting with my flatmates discussing possible app ideas that gradually got sillier as we got more desperate. It occurred to me how many times a mate has come out with something funny and I’ve kicked myself for not having written it down somewhere.

“There’s a town called Crematorium?” – Joe Crellin (seeing a road sign on the way to Manchester)

The app was developed with help from my mate Sam Millner. Thanks also to Guy Brown for his top lectures on iOS and Dom and Rob for their feedback and advice.

Please check it out on the App Store and take it for a spin! I’d love to know what you think via email or Twitter: @samrayner.


Spotify is a great service but I don’t use it anywhere near enough to warrent paying £10 a month for a Premium subscription. I only use the app occasionally to check out a band I’ve had recommended before buying their album on iTunes or leaving it.

I do use Spotify just enough for the ads to get annoying though. To get around hearing them, I created a simple Mac app called Shushify.

Shushify icon Download Shushify

To listen without ads, just launch instead of Spotify will open as normal but when an advert begins to play Shushify will temporarily mute your Mac’s audio.

Shushify works by querying Spotify for track info every time a new one starts playing (and every few seconds for good measure). The process will quit when you quit Spotify.

You’ll still get an awkard silence for the duration of adverts but that’s good enough for me. If you find yourself using Spotify a lot, please consider paying for a subscription; it really is a great service.

Shushify is offered as-is, unsupported. There’s a good chance Spotify will break it in the future but hopefully it’ll come in handy for some people until then.

Handy Scripts

I have a bunch of Applescripts and shell scripts that live in Alfred and make my computing life a little easier. Here’s a collection of the the ones I’ve written. Most of them are pretty niche but hopefully they’ll prove useful to somebody.

Toggle Invisible Files

If invisibile files are hidden, show them, and vice versa. (Note: will restart Finder).

Top Google URL

Grab the URL of the top result for a search (using the Google Search API) and copy it to the clipboard.

Open Tab in Chrome

Opens the frontmost Safari tab in Google Chrome.


Takes a chunk of text and converts everything to HTML character entities. Useful for encoding email addresses for spam-free publication on the web. The result is copied to your clipboard.

App Installer

Move any .app files from ~/Downloads to /Applications, overwriting existing apps.

5by5 Show Notes

Open the links list for the 5by5 show that is currently playing in iTunes.

Post Archive