Skip to content

Instantly share code, notes, and snippets.

View tvachon's full-sized avatar

Todd Vachon tvachon

  • OnCourse Systems for Education
  • Media Pa
View GitHub Profile
@gefangenimnetz
gefangenimnetz / materialDesignShadowHelper.less
Last active December 17, 2022 17:21
Less css box-shadow helper for cards & modals according to Googles Material Design spec.
/**
* A mixin which helps you to add depth to elements according to the Google Material Design spec:
* http://www.google.com/design/spec/layout/layout-principles.html#layout-principles-dimensionality
*
* Please note that the values given in the specification cannot be used as is. To create the same visual experience
* the blur parameter has to be doubled.
*
* Author: Florian Kutschera (@gefangenimnetz), Conceptboard GmbH (@conceptboardapp)
*
* Example usage:
@hrbrmstr
hrbrmstr / quakes.R
Created April 1, 2014 19:37
March 2014 California Earthquakes via ggmap/ggplot
library(ggplot2)
library(ggmap)
library(plyr)
library(grid)
library(gridExtra)
# read in cleaned up data
dat <- read.table("quakes.dat", header=TRUE, stringsAsFactors=FALSE)
# map decimal magnitudes into an integer range
@gruber
gruber / make_bookmarklet.pl
Last active September 13, 2023 23:22
JavaScript Bookmarklet Builder
#!/usr/bin/env perl
#
# http://daringfireball.net/2007/03/javascript_bookmarklet_builder
use strict;
use warnings;
use URI::Escape qw(uri_escape_utf8);
use open IO => ":utf8", # UTF8 by default
":std"; # Apply to STDIN/STDOUT/STDERR

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.
// =========================
// Example 1: using a @mixin
// =========================
// SCSS:
@mixin a_pink_box() {
float: left;
display: block;
color: pink;