View update-image.sh
#!/bin/bash
# Adapted from...
# https://stackoverflow.com/questions/26423515/how-to-automatically-update-your-docker-containers-if-base-images-are-updated
DATAPATH='./data/docker/updater/data'
UNAME="<DOCKER_HUB_USERNAME>"
UPASS="<DOCKER_HUB_PASSWORD>"
View serverless-creation-iam-policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"iam:CreateRole",
"iam:CreatePolicy",
"iam:AttachRolePolicy",
"iam:PassRole",
"lambda:GetFunction",
View Lambda-ApiGateway-Cloudformation.json
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS CloudFormation sample template that contains a single Lambda function behind an API Gateway",
"Resources": {
"GreetingLambda": {
"Type": "AWS::Lambda::Function",
"Properties": {
View dedupeInlineCSS.js
var _ = require( 'lodash' );
module.exports = function ( html ) {
var anyInlineCssTag = new RegExp( '<style type="text/css">[^<]*</style>', 'g' );
var matches = html.match( anyInlineCssTag );
_.uniq( matches ).forEach( function( styleTag ) {
View gist:cd74dcaecbc3e8f4c262067c89e3ad1b
#!/bin/bash
# Create a temp file that runs install instructions on the host
cat > finish-code-deploy.sh <<- EOM
rm -fr tweetgest.com
mkdir tweetgest.com
unzip code-to-deploy.zip -d tweetgest.com
EOM
# Zip up and deploy the code and the install script
View BBC News JavaScript Standard v0.0.md

# BBC News JavaScript Standard v0.0

Contents:

  • Introduction
  • Ensuring availability of JavaScript content for all users
  • JavaScript coding strategies
  • Legal requirements
  • Implementation and optimisation
  • XML HTTP Requests (AJAX)
View docker.sh
#!/bin/bash
VM=default
DOCKER_MACHINE=/usr/local/bin/docker-machine
VBOXMANAGE=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
BLUE='\033[0;34m'
GREEN='\033[0;32m'
NC='\033[0m'
View hint-example.js
function init () {
async.series([
function( callback ) {
firstFunction( callback );
},
function( callback ) {
secondFunction( callback );
}
]);
View gist:4a2747d272f81159d206

My nan used to always cheat at Scrabble. I know this because she always used to help me win. She stopped cheating to help me about 10 years ago when I won without her help. I murdered the competition during that game, beating my sister, my mum and my nan by at least 100 points. From that day on nan always cheated to help the people I was playing against.

My nan always used to comment on my appearance. One year when I was growing my hair long each time I saw her she would tell me I looked scruffy. That I should get my hair cut short just like my granddad's. But when I did eventually get my hair cut she took one look at it and said "What you get your haircut for? I liked it the way it was".

My nan always used to tell me what to eat. She treated my being a vegetarian with great suspicion. Every week when I would take her shopping she'd try to tempt me with varying different kinds of meats from ASDA's deli section. And when she would cook for me on a Friday lunchtime she'd always offer to put an extr

View gist:91b64d539ba0189b83fe

Image quality research

Summary:

After looking into the issue of the image quality of Visual Journalism output on the News website we have decided that there are a number of actions we can take:

  • Visual Journalism upload larger sized images (976px as a minimum). These will then be down scaled rather than upscaled.

  • Increase use of art direction tooling (AI2RWD for example).