Skip to content

Instantly share code, notes, and snippets.

View Wilfred's full-sized avatar

Wilfred Hughes Wilfred

View GitHub Profile
@Wilfred
Wilfred / XHP ns token.md
Created October 9, 2019 19:05 — forked from fredemmott/XHP ns token.md
XHP ns token

Template composition with inclusion

Every template language I have seen provides some mechanism for one template to include another, thus supporting the reuse of repeated elements like headers and footers. The included templates are called partials in Mustache parlance:

<!-- home.hbs -->
<html>
<body>
  {{> header}}
  <p> HOME </p>
  {{> footer}}
@Wilfred
Wilfred / travis.sh
Created March 26, 2014 20:12 — forked from rejeep/travis.sh
#!/bin/sh
# This script will setup Evm and Cask on Travis to use for Emacs Lisp testing.
#
# In .travis.yml, add Evm and Cask to PATH.
#
# - export PATH="/home/travis/.cask/bin:$PATH"
# - export PATH="/home/travis/.evm/bin:$PATH"
sudo mkdir /usr/local/evm
/*
* Placeholder plugin for jQuery
* @author Daniel Stocks (http://webcloud.se)
*/
(function($) {
function Placeholder(input) {
this.input = input;
if (input.attr('type') == 'password') {
this.handlePassword();
}
@Wilfred
Wilfred / gfm.py
Created April 4, 2011 14:17 — forked from gasman/gfm.py
"""GitHub flavoured markdown: because normal markdown has some vicious
gotchas.
Further reading on the gotchas:
http://blog.stackoverflow.com/2009/10/markdown-one-year-later/
This is a Python port of GitHub code, taken from
https://gist.github.com/901706
To run the tests, install nose ($ easy_install nose) then: