Skip to content

Instantly share code, notes, and snippets.

View gwilym's full-sized avatar

Gwilym Evans gwilym

  • Canva
  • Australia
View GitHub Profile
@gwilym
gwilym / keybase.md
Created December 5, 2014 03:26
keybase.md

Keybase proof

I hereby claim:

  • I am gwilym on github.
  • I am gwilym (https://keybase.io/gwilym) on keybase.
  • I have a public key whose fingerprint is DE83 74A7 EAFF 85E3 1A89 234C 2837 BCF8 C181 3DC3

To claim this, I am signing this object:

package main
import (
"bufio"
"encoding/json"
"os"
)
type LazyEntry struct {
Timestamp string `json:"timestamp"`
@gwilym
gwilym / vercomp.sh
Last active December 20, 2015 11:59
version string comparison for bash
#!/bin/bash
# source: http://stackoverflow.com/questions/4023830/bash-how-compare-two-strings-in-version-format
vercomp () {
if [[ $1 == $2 ]]
then
return 0
fi
local IFS=.
@gwilym
gwilym / rps-503.html
Created February 6, 2013 02:12
Source of the rockpapershotgun 503 page
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Rock, Paper, Shotgun: Error! 503 Service Unavailable </title>
<script src="http://error.rockpapershotgun.com/interpreter/jquery.min.js" defer></script>
<script src="http://error.rockpapershotgun.com/interpreter/parchment.min.js" defer></script>
<link rel="stylesheet" type="text/css" href="http://error.rockpapershotgun.com/interpreter/parchment.css">
<meta name="viewport" content="width=device-width,user-scalable=no">
From 8f49cae2b5723533f2c335f1ecd892ba718d2e40 Mon Sep 17 00:00:00 2001
From: gwilym <github@whoah.net>
Date: Sat, 5 Jun 2010 14:28:16 +1000
Subject: [PATCH] hack to call closures via twig templates
---
lib/Twig/Resource.php | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/Twig/Resource.php b/lib/Twig/Resource.php