Wednesday, 12 October 2011

R - GGplot with white background

I wanted to draw a graph without lines and backgrounds. The relevant code is:

opts(panel.grid.minor = theme_blank(), panel.grid.major = theme_blank(), panel.background = theme_blank())


s = seq(-2*pi, 2*pi, length.out = 1000)

dat = data.frame(x = s)

ggplot(dat) +
geom_line(aes(x = x, y = sin(1*x)), size = 2, color = "red") +
geom_line(aes(x = x, y = sin(1.1*x)), size = 2, color = "red", linetype="dashed") +
panel.grid.minor = theme_blank(),
panel.grid.major = theme_blank(),
panel.background = theme_blank()

Thursday, 6 October 2011

Android voice search

Android voice search works much better if you change
Settings -> Voice recognizer settings -> Language 

From English (Australia) to English (US).

For example, "map brisbane" actually brings up a map rather than just doing google search.

See for commands.

Monday, 19 September 2011

microwave garlic bread

I just made garlic bread following the microwave instructions on the packet (For science!).

What the packet said:
- Remove from packet.
- Microwave on high for 1 minute 10 seconds.

What it should have said:
- Remove from packet.
- You can't microwave garlic bread, don't be stupid.

Or possibly:
- Remove from packet.
- Microwave on high for 1 minute 10 seconds.
- Crisp up the resulting soggy blob using creme brule torch for almost passable garlic bread substitute.

Wednesday, 20 April 2011

Theatre Review: Pirate Rhapsody, Mermaid Requiem

Editor's note: Brisbane's Anywhere Festival is looking for reviewers. Because of the style of review Tim wants to demonstrate he can write, he has written this as if he saw an early performance and you could still go see the show. He didn't and you can't.

I saw Pirate Rhapsody, Mermaid Requiem on the last day of the Adelaide Fringe Festival, 2011. It was funny and strange and great. You should go see it. Tommy Brandson plays the audience like a violin virtuoso. Actually, it was a bit cruder than that. Tommy plays the audience like a banjo virtuoso. Even though he was wearing an eyepatch he produced more pathos with one eye than most people could with two. Or more.

The show is nominally a retelling of The Little Mermaid but I see it more as a collection of dark jokes and dirty, tragic songs. It is divided into two parts. In the first part Tommy plays a pirate; eyepatch, peg leg and all. In the second he plays the mermaid; fish tail'd and requiring frequent sprays of water from a mister. An audience member is enlisted to do the spraying. On a related note, theater goers that are adverse to a little audience participation should avoid sitting in the front row and in aisle seats.

The show was played in a tiny theater at the festival. It felt a little like seeing a performance in a shipping container, but I think the cramped conditions fit the mood of the piece. The musical ambiance was understated and effective, kudos to the two musicians.

Bonus Twitter version of the review:

"Pirate Rhapsody, Mermaid Requiem" was funny and strange and great.
You should go see it. #AdlFringe #review

Monday, 28 March 2011


I've been reading Sandcastles Made Simple by Lucinda Wierenga, which I bought after reading an extract in The Guardian.

Here's some photos of my initial experiments:

You can see a few more (at higher res) at my sandcastles flickr set.

Tuesday, 25 January 2011

sfBehatPlugin - BDD for symfony

I just installed sfBehatPlugin, a behat plugin for symfony.

Tip: if behat isn't finding the steps that come with sfBehatPlugin and you're getting:

$ behat features/
Feature: auth

Scenario: Index page # features/frontend/auth.feature:3
Given I am on homepage
When I go to /auth
Then Response status code is 200
And I should see "This is a temporary page"

1 scenario (1 undefined)
4 steps (4 undefined)

You can implement step definitions for undefined steps with these snippets:

$steps->Given('/^I am on homepage$/', function($world) {
throw new \Everzet\Behat\Exception\Pending();

$steps->When('/^I go to /auth$/', function($world) {
throw new \Everzet\Behat\Exception\Pending();

$steps->Then('/^Response status code is (\d+)$/', function($world, $arg1) {
throw new \Everzet\Behat\Exception\Pending();

$steps->And('/^I should see "([^"]*)"$/', function($world, $arg1) {
throw new \Everzet\Behat\Exception\Pending();

Try running it from the root of your symfony project, with no params:

$ behat
Feature: auth

Scenario: Index page # features/frontend/auth.feature:3
Given I am on homepage # features/steps/tester_browser_steps.php:13
When I go to /auth # features/steps/tester_browser_steps.php:17
Then Response status code is 200 # features/steps/tester_response_steps.php:13
And I should see "This is a temporary page" # features/steps/tester_response_steps.php:17

1 scenario (1 passed)
4 steps (4 passed)