Skip to content

Instantly share code, notes, and snippets.

View phloe's full-sized avatar

Rasmus Fløe phloe

View GitHub Profile
@phloe
phloe / Bake Cookies
Last active December 10, 2015 18:49
var bake_cookie = (function () {
function decode (string) {
return decodeURIComponent(
string.replace(/%2[1789A]/gi, function(d){
return String.fromCharCode(parseInt(d.slice(1), 16));
})
);
}
@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;