Skip to content

Instantly share code, notes, and snippets.

@n6333373
n6333373 / converter_testbench.yaml
Last active April 29, 2024 18:30
繁化姬 - 字典測試
%YAML 1.2
---
#
# This file is the testbench for ZhConverter converters.
#
# https://zhconvert.org
#
# commons => args that would be merged into all tests
# texts => the text under test and the expected result

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}}
@andris9
andris9 / git-cache-meta.sh
Created March 5, 2012 13:15
git-cache-meta
#!/bin/sh -e
#git-cache-meta -- simple file meta data caching and applying.
#Simpler than etckeeper, metastore, setgitperms, etc.
#from http://www.kerneltrap.org/mailarchive/git/2009/1/9/4654694
#modified by n1k
# - save all files metadata not only from other users
# - save numeric uid and gid
# 2012-03-05 - added filetime, andris9