Skip to content

Instantly share code, notes, and snippets.

View nigelr's full-sized avatar

Nigel Rausch nigelr

  • brisbane, australia
View GitHub Profile
@nigelr
nigelr / song_spec.rb
Created January 14, 2013 00:14
Cheat
it "meme" do
url = "http://www2b.abc.net.au/votecentral/Client/PlaceVote.aspx?E=96&IX=0&IG=2"
doc = Nokogiri::HTML(open(url))
list = doc.at("div .IndexPageContent")
list = list.at("p")
list.css("span .artist").each do |item|
puts "#{item.text} - #{ item.next_element.next_element.text}"
end
@nigelr
nigelr / resize.sh
Last active December 10, 2015 17:18
Resizes TimeMachine sparesbundle maximum size and then locks the file
#!/bin/bash
# This script resizes a sparsebundle and locks the Info.plist to prevent timemachine resizing it.
# Usage
# resize.sh MacBook.sparsebundle 100g
# which resizes the sparse bundle to 100GB
echo "unlocking Info.plist"
SetFile -a l "${1%/}/Info.plist"