Skip to content

Instantly share code, notes, and snippets.

@geelen
geelen / index.html
Created December 19, 2012 06:26 — forked from anonymous/index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
</head>
<body>
<script>
(function ( window, document ) {
// Pinched domready
// http://www.dustindiaz.com/smallest-domready-ever/
import React from 'react'
import styled from 'styled-components'
const Pre = styled.pre`
background-color: papayawhip;
color: palevioletred;
padding: .5rem;
font-family: monospace;
`
@geelen
geelen / perf.js
Created September 24, 2016 04:39
function makeRandomColor() {
return '#' + Math.random().toString(16).substr(-6)
}
let tag = document.createElement('style')
tag.type = 'text/css'
tag.appendChild(document.createTextNode(''));
(document.head || document.getElementsByTagName('head')[0]).appendChild(tag)
let styleSheet = [...document.styleSheets].filter(x => x.ownerNode === tag)[0]
<=21DOCTYPE html PUBLIC =22-//W3C//DTD XHTML 1=2E0 Strict//EN=22 =22http:=
//www=2Ew3=2Eorg/TR/xhtml1/DTD/xhtml1-strict=2Edtd=22>=0A<html xmlns=3D=22=
http://www=2Ew3=2Eorg/1999/xhtml=22>=0A<head>=0A<meta http-equiv=3D=22Con=
tent-Type=22 content=3D=22text/html; charset=3Dutf-8=22>=0A<meta name=3D=22=
viewport=22 content=3D=22width=3Ddevice-width, initial-scale=3D1=2E0=22>=0A=
<title>Anthony is now following your reviews on Goodfilms=2E</title>=0A<s=
tyle type=3D=22text/css=22 data-immutable=3D=22true=22>=0A=09=09table td =
=7Bborder-collapse: collapse;=7D=0A=0A=09=09=40media only screen and (-we=
bkit-min-device-pixel-ratio: 2) =7B=0A /* Put your iPhone 4g styles =
in here */=0A=09=09=7D=0A=0A=09=09/* Following Android targeting from:=0A=

NG MELB NOVEMBER

Talks

  • Alan Harper - Something something GO
  • Ben Schwarz - Something something Progressive Enhancement

But first

  • PIZZA!
@geelen
geelen / europe.md
Last active December 28, 2015 09:19
  • Lisbon
  • Madrid
  • Barcelona
  • Marseille
  • Lyon
  • Milan
  • Zurich
  • Munich
  • Prague
  • Berlin
results = [["something", "i", "want"], ["to", "copy", "to"], ["excel", "lol", "ol"]]
open('|pbcopy', 'w') { |w| w << results.map { |r| r.join("\t") }.join("\n") }
SELECT submissions.*
FROM submission
INNER JOIN
(
SELECT submission_id, max(id) as max_id
FROM statuses
GROUP BY submission_id
) sub_query
ON submissions.id = sub_query.submission_id
INNER JOIN statuses
@geelen
geelen / haskell.sh
Created September 17, 2013 05:20
Real-world benchmarks
$ time ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
real 0m0.074s
user 0m0.006s
sys 0m0.012s