Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Osaka by Tom Royal on Flickr

You're using a very old version of Internet Explorer which can't show the photos that should be in this box. Please consider upgrading to a newer version of IE or an alternative such as Firefox. Thanks.

Can you travel to Gatwick Airport using Oyster or Contactless?

April 30th, 2015

No, you can’t. If you try to visit this London airport using Transport for London’s Oyster or Contactless payments, you’ll find a line of ticket inspectors waiting to fine you – and everyone else who makes the same mistake – £20.

Plus you’ll get charged a maximum fare on Oyster or Contactless for not ending your journey.

And that’s despite the Gatwick website saying that both have been valid since 2014.

So, watch out. It’s a nasty setup.

IMG_2931

How To: Push Mag+ MIB files via Automator

March 31st, 2015

automator

At work at Apptitude Media, we make interactive digital magazines, brochures and the like using the Magplus system – both for ourselves, and for clients.

One of the final stages of any project is to send the finished MIB content file to a device for testing – it’s an action we perform several times each day. And there are a few ways to do it, the most convenient of which is the Simple MIB Pusher.

But here’s an even quicker way, if you’re on a Mac.

Open Automator, and create a new Service. Call it something like “Send to iPad”. Set it to receive selected files or folders from Finder.

Drag on the “Run Shell Script” command. Paste the following:

1
2
3
4
while read f
do
curl -X POST -F "file=@$f" http://192.168.1.240:50000
done

.. substituting your device’s IP address in for 192.168.1.240. Save the workflow. You can now send any MIB to your device in one click from the Finder context menu.

Tweet Your Heat: Controlling Nest via Twitter

January 24th, 2015

TBC

How To: Write a RTing Twitter bot in PHP

January 19th, 2015

File this one under “stuff I’ve been meaning to look up for ages”: yesterday I finally sat down and wrote a Twitter-bot. You know the kind – a dedicated account that looks for updates containing a certain word or phrase, then retweets them – I often end up being tweeted by @redscarebot, for example.

Anyhow, here’s how to write your own, in just a few lines of PHP. You’ll need:

1) A server running PHP and MySQL (I set up an Appfog instance)

2) A Twitter account to post from, with a mobile phone number entered in settings

3) A computer somewhere to execute the script every X minutes via CRON

So, with all that in place: download and extra the TwitterOAuth library, then start a new PHP file. Require it:

require "twitteroauth/autoloader.php";
use Abraham\TwitterOAuth\TwitterOAuth;

Register an app at apps.twitter.com, then define the secrets required to access the API in your code:

define('CONSUMER_KEY', 'here');
define('CONSUMER_SECRET', 'here');
define('ACCESS_TOKEN', 'here');
define('ACCESS_TOKEN_SECRET', 'here');

Define your connection:

$twitter = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);

And then you’re ready to make a call to the Twitter API. You’ll probably want to search:

$sstring = '"sleepy cats" OR kittens';
$searchresult = $twitter->get("search/tweets", array("q" => urlencode($sstring), "since_id" => $since, "count" => 100, "result_type" => "recent"));

Note the variable $since – this is the ID of the last tweet processed by the bot on its last execution, used to prevent retweeting the same stuff over and over. Store and retrieve it from MySQL.

You know have $searchresult, and you’ll want to get the tweets out of it:

foreach($searchresult as $tweet) {
$tweettext = $tweet->text;
$tweetid = $tweet->id;
}

.. and you can do whatever you want with those. Want to post a message, probably created by trimming and formatting selected content from the search output? If you have your message in $somestatus

$postthis = $twitter->post("statuses/update", array("status" => $somestatus));

.. and that’s about it. Update your $since ID in MySQL, and close up the PHP file. Call it by CRON every X minutes to check for and retweet new messages.

This is only just barely scratching the surface, of course. Each tweet object contains loads of information that you can process to do more interesting things – see the API reference for details.

The Robot Reporter

January 18th, 2015

Hello. If you’re visiting this post, you’ve probably spotted @theroboreporter on Twitter. Or maybe it retweeted you, and you’ve asked why, or asked it to delete a tweet.

In any case, here’s what you need to know: @theroboreporter isn’t a person, it’s software. Here’s what it does:

1) Journalists all around the world scour Twitter for images they want to republish.

2) When they find one, they tweet to the person who posted it, asking for permission.

3) @theroboreporter publishes a link to the original tweet.

This only happens if the original tweet is public, and @theroboreporter only links to the original tweet. It does not copy, duplicate or reproduce the tweet’s content – text or images. If you see your text and image under the @theroboreporter’s name, that’s because Twitter is showing your original tweet there.

How to remove something you tweeted

If you delete your tweet or any associated images or video, the tweet from @theroboreporter will remain, but anyone clicking the link in it won’t see anything. So, if you’ve tweeted something that you regret making public, deleting that tweet will allow you to remove it immediately.

How to remove something that someone else tweeted

Like any software, this program is only as smart as the information entered into it – in this case, via Twitter, so errors can occur.

In general, I will remove links to anything that:

1) Is illegal in the UK, or

2) Contravenes any of the NUJ’s ethical guidelines

To request the removal of a link, please contact me at @tomroyal.

Occasionally, when breaking news events result in the publication of floods of images in violation of the rules above, I shut the whole thing down for a time. When this happens you’ll see a note in the feed.

Why are you doing this?

Because I’m interested in breaking news, how people report it, and how technology both influences and is influenced by newsgathering. And also I like robots.