Skip to content

Instantly share code, notes, and snippets.

View UltraSimplified's full-sized avatar

Robin Layfield UltraSimplified

View GitHub Profile
@UltraSimplified
UltraSimplified / dabblet.css
Created March 7, 2012 19:22 — forked from anonymous/dabblet.css
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
font-family: copperplate;
background-color: #D6AA39}
h1 {color: #8C6D8D}

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

Lesson's learnt building the Guardian

Below is a collection of my favourite responses I gathered from Guardian engineers when asked the question: What have you learnt starting from scratch and building a mobile-first next generation web platform for the Guardian?

Daithi O Crualaoich

  • Work with great people.
  • Deploy like crazy. This means the team has to control the infrastructure as well as code.
  • Design is not a service. Designers have to sit in the team.
  • Infrastructure is intrinsically unreliable. Discard and replace is the robust strategy.
  • Use your CDN for HTML too.
  • Don't always do as you are told.
@UltraSimplified
UltraSimplified / relative-time.php
Last active December 3, 2021 05:33 — forked from mtttmpl/relative-time.php
Get Relative Time in PHP (e.g. '1 hour ago', 'yesterday', 'tomorrow', 'in 2 weeks')
<?php
function time2str($ts) {
if(!ctype_digit($ts)) {
$ts = strtotime($ts);
}
$diff = time() - $ts;
if($diff == 0) {
return 'now';
} elseif($diff > 0) {
$day_diff = floor($diff / 86400);