Skip to content

Instantly share code, notes, and snippets.

View dblooman's full-sized avatar

David Blooman dblooman

View GitHub Profile
@dblooman
dblooman / gist:4510941
Created January 11, 2013 14:15
News manifest
news manifest{
"name": "BBC News",
"description": "Get the latest, breaking news from our team of reporters",
"launch_path": "/news",
"icons": {
"128": ""
},
"developer": {
"name": "BBC News",
"url": "http://www.bbc.co.uk"
@dblooman
dblooman / gist:4539598
Created January 15, 2013 15:48
har netsniff
if (!Date.prototype.toISOString) {
Date.prototype.toISOString = function () {
function pad(n) { return n < 10 ? '0' + n : n; }
function ms(n) { return n < 10 ? '00'+ n : n < 100 ? '0' + n : n }
return this.getFullYear() + '-' +
pad(this.getMonth() + 1) + '-' +
pad(this.getDate()) + 'T' +
pad(this.getHours()) + ':' +
pad(this.getMinutes()) + ':' +
pad(this.getSeconds()) + '.' +
@dblooman
dblooman / gist:4539616
Last active December 11, 2015 03:39
har script
phantomjs examples/netsniff.js http://m.bbc.co.uk/news false iPhone 320 > Njsios320.har
phantomjs examples/netsniff.js http://m.bbc.co.uk/news true iPhone 320 > jsios320.har
phantomjs examples/netsniff.js http://m.bbc.co.uk/news true iPhone 600 > jsios600.har
phantomjs examples/netsniff.js http://m.bbc.co.uk/news true iPhone 1024> jsios1024.har
@dblooman
dblooman / gist:4555565
Created January 17, 2013 12:17
image
curl http://localhost:3000/?url=m.live.bbc.co.uk/news\&width=320\&userAgent=font-exclude\&delay=2000\ > bbc1L.png
curl http://localhost:3000/?url=http://dave-sandbox.t.proxylocal.com/news\&width=320\&userAgent=font-exclude\&delay=2000\ > bbc1.png
node imagediff [-d|diff] bbc1.png bbc1L.png diff1.png
task :default => [:reset_shots_folder, :save_images, :compare_images] do
puts 'Done!';
end
task :compare_images do
files = []
Dir.glob("shots/*/*.png") do |filename|
files << filename
end
java -jar <sel> -host 192.168.1.XX -role node -hub http://10.227.45.237:4444 -browser browserName=firefox,platform=WINDOWS -browser "browserName=internet explorer,platform=WINDOWS
java -jar selenium-server-standalone-2.32.0.jar -host 192.168.1.11 -role node -hub http://10.227.45.237:4444 -browser browserName=firefox,platform=WINDOWS -browser browserName=chrome,platform=WINDOWS -browser "browserName=internet explorer,version=9,platform=WINDOWS
@dblooman
dblooman / config
Created August 19, 2013 11:26
config
#Type domain URL below, here are a couple of examples
domains:
code: http://pal.sandbox.dev.bbc.co.uk
live: http://www.live.bbc.co.uk
#compare_domain: http://www.live.bbc.co.uk
#Type screen widths below, here are a couple of examples
screen_widths:
- 320
# Add only 2 domains, key will act as a label
domains:
sandbox: "http://pal.sandbox.dev.bbc.co.uk"
live: "http://pal.sandbox.dev.bbc.co.uk"
#Type screen widths below, here are a couple of examples
screen_widths:
- 320
- 600
- 1024
#Type domain URL below, here are a couple of examples
domains:
code: http://pal.sandbox.dev.bbc.co.uk
live: http://www.live.bbc.co.uk
#compare_domain: http://www.live.bbc.co.uk
#Type screen widths below, here are a couple of examples
screen_widths:
- 320