Skip to content

Instantly share code, notes, and snippets.

View matth's full-sized avatar

Matt Haynes matth

  • BBC
  • United Kingdom
View GitHub Profile
command: rake test gem:build gem:push
@matth
matth / xbox_convert
Last active December 15, 2015 23:28
Convert video to a format that xbox actaully plays, requires ffmpeg, bash, linux / mac
#!/bin/bash
set -e
if [ $# -ne 1 ] || [ ! -f $1 ]; then
echo "usage: `basename $0` file"
exit 1
fi
input=$1
client = BBC::Redux::Client.new
user = client.login("your-username", "your-password")
key = client.key("5286788632060148780", user.session)
frame = "http://framestore.bbcsnippets.co.uk/generate/frame/by_disk_reference/5286788632060148780/400/57.jpg?key=" + key.value
client.logout(user)
@matth
matth / test.rb
Created November 8, 2011 00:39
test
puts "Hello world"
@matth
matth / Procfile
Created July 28, 2011 10:44
Blank lines in Foreman Procfile
echo1: echo "Hello world 1"
echo2: echo "Hello world 2"
@matth
matth / google_terms_position.rb
Created March 16, 2011 16:51
Google Search Term > Page positions finder
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'cgi'
searches = [['alf', 'www.hedweb.com/alffaq.htm'], ['bold food', 'http://dockets.justia.com/docket/new-york/nysdce/1:2009cv00440/338836/']]
searches.each do |term, url|
def search(term, url, start = 0)
@matth
matth / assignment.tex
Created January 21, 2011 14:00
OU TMA Latex Example
\documentclass{ou-assignment}
\student{My Name}
\email{me@example.net}
\identifier{B1234567}
\course{M248}
\tma{1}
\tmapart{1}
\date{January 20, 2011}