Skip to content

Instantly share code, notes, and snippets.

View tmaslen's full-sized avatar

Tom Maslen tmaslen

View GitHub Profile
@tmaslen
tmaslen / gist:7251107
Last active December 27, 2015 02:19
Coin Test

BBC Coin Algorithm Test

DEVELOPER ASSESSMENT

Summary

Write a simple JavaScript application that given a number of pennies will calculate the minimum number of Sterling coins needed to make that amount.

Eg. 123p = 1 x £1, 1 x 20p, 1 x 2p, 1 x 1p

// How I have to do it
@mixin image {
background: #ccc;
margin: 0 0 1.5em;
padding-top: 4px;
p {
color: #666;
@tmaslen
tmaslen / gist:5704427
Last active December 18, 2015 01:29
Lets make a page we can put on responsivenews.co.uk to tell people what its like to work here. Its just something we can point people to when we don't/in addition to a job ad. It annoys me that we don't have something like this.

Working in the BBC News dev team

  • Awesome product
    • Responsive, mobile first. performance
    • Work with a world class journalism team
    • 100s of millions of users
    • Everyone in the world will know your product (watch people use your code on the train/bus while commuting into work)
  • The role
  • Skillset
  • World class front end HTML5 / CSS3
@tmaslen
tmaslen / gist:5425445
Created April 20, 2013 09:50
I had to comment it out to make my single instance of apache (yes, I no longer have 3 apaches running) not error.
# ProxyPass / http://pal.sandbox.dev.bbc.co.uk/
# ProxyPass / http://static.sandbox.dev.bbc.co.uk/
# ProxyPreserveHost on
TomMaslenXXL:workspace maslet02$ rake tools:concat_js
rake aborted!
No such file or directory - tabloid/webapp/static/js/js_to_concat.js
Tasks: TOP => tools:concat_js
(See full trace by running task with --trace)
<?php
class BBC_News_Core_Controller_BaseController extends BBC_Controller_Action
{
protected $container;
/**
* Primarily intended for extending the constructor.
* Initializing resources used in the controller
function aboveFold(obj) {
var curtop = 0;
if (obj.offsetParent) {
do {
curtop += obj.offsetTop;
} while (obj = obj.offsetParent);
}
else {
curtop = obj.offsetTop;
}
function ctm() { var u = 'undefined'; return ((typeof document.querySelector !== u) && (typeof localStorage !== u) && (typeof window.addEventListener !== u)) ? true : false;}
function ctm() {var u='undefined';return typeof document.querySelector!==u && typeof localStorage!==u && typeof window.addEventListener!==u ? true:false;}
function ctm(){return 'querySelector' in document && 'localStorage' in window && 'addEventListener' in window ? true:false}
function ctm(){try{return 'querySelector' in document && 'localStorage' in window && 'addEventListener' in window ? true:false;}catch(){return false}}
function ctm(){return 'querySelector' in document && 'localStorage' in window && 'addEventListener' in window}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB">
<head profile="http://dublincore.org/documents/dcq-html/">
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link rel="schema.dcterms" href="http://purl.org/dc/terms/" />
<meta name="DCTERMS.created" content="2006-09-15T12:00:00Z" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB">
<head profile="http://dublincore.org/documents/dcq-html/">
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link rel="schema.dcterms" href="http://purl.org/dc/terms/" />
<meta name="DCTERMS.created" content="2006-09-15T12:00:00Z" />