Skip to content

Instantly share code, notes, and snippets.

@elmimmo
elmimmo / plist2xml.xslt
Created June 1, 2012 10:47
XSLT: from plist to intermediate XML format
<?xml version="1.0" encoding="utf-8"?>
<!-- Stylesheet for converting between plist and an intermediate format -->
<!-- Copyright 2006 Theo Hultberg, all rights reserved -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml"
indent="yes"
@elmimmo
elmimmo / poem.html
Created October 3, 2011 21:29
Semantic HTML for poems + CSS styles for indented wrapping lines for small screens
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Styling a poem</title>
<style type="text/css">
/* Left-aligned text in a centered block (mangles text in Adobe Digital Editions 1.7, so search an alternative if you need to support it) */
.poem {
display: table;
margin-right: auto;
@elmimmo
elmimmo / mmdp.sh
Created September 22, 2011 10:43
Preview (multi)markdown in preferred browser
# Preview (multi)markdown documents in the preferred browser.
function mmdp() {
if [ -z "$1" ]; then
echo "Usage: mmdp FILE"
return 1
fi
# Determine how to open a file based on OS, and what MMD binary to use:
local OS=$(uname -s)