Skip to content

Instantly share code, notes, and snippets.

View phloe's full-sized avatar

Rasmus Fløe phloe

View GitHub Profile
(function (doc) {
var parent = doc.documentElement,
rect = parent.getBoundingClientRect(),
canvas = doc.createElement("canvas"),
context = canvas.getContext("2d"),
max = 0, rects = [];
canvas.width = rect.width;
canvas.height = rect.height;
@phloe
phloe / mustachsucks.html
Created May 18, 2011 17:35 — forked from ryanflorence/mustachsucks.html
Mustache sucks
<h2>{{name}}</h2>
<ul>
{{#subItems}}
<li>
Sub Item name: {{name}}
Parent Item name: {{?!}}
parent name is inaccessible since the subItem has a name property :(
how is this not a common use case?
</li>
{{/subItems}}
@phloe
phloe / centered_triangle.html
Created May 3, 2011 10:43 — forked from romannurik/centered_triangle.html
A simple CSS trick to create a horizontally- or vertically-centered 'selected' callout triangle using zero images.
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 40px;
}
a {
display: inline-block;
alert('hello, world');