Skip to content

Instantly share code, notes, and snippets.

View eerohele's full-sized avatar
🐺

Eero Helenius eerohele

🐺
View GitHub Profile
@eerohele
eerohele / lxml.sh
Last active August 29, 2015 14:27
Statically compiling lxml on Ubuntu 15.04 and Python 3.3.3
# Apply https://github.com/mxe/mxe/blob/7e231efd245996b886b501dad780761205ecf376/src/libiconv-1-fixes.patch
CFLAGS="$CFLAGS -fPIC" STATIC_DEPS=true pip install lxml
@eerohele
eerohele / keybase.md
Created April 16, 2015 09:45
keybase.md

Keybase proof

I hereby claim:

  • I am eerohele on github.
  • I am eerohele (https://keybase.io/eerohele) on keybase.
  • I have a public key whose fingerprint is EE74 26FF 3791 94E1 C33A 209E 3DA0 E4C6 F612 121D

To claim this, I am signing this object:

@eerohele
eerohele / paredit.markdown
Last active August 29, 2015 14:15
paredit keymap for Sublime Text on OS X

Kill

    ⌘ + ⌦    Forward kill word
    ⌘ + ⌫    Backward kill word

Move

@eerohele
eerohele / dita.clj
Created November 20, 2014 15:21
An example of parsing a DITA file with clojure-saxon
(ns dita
(:require [saxon :as xml])
(:import (net.sf.saxon.trans XmlCatalogResolver)))
(def xmldoc (slurp "/path/to/ditamap"))
(. net.sf.saxon.trans.XmlCatalogResolver
(setCatalog "/path/to/dita-ot/src/main/catalog-dita.xml" (.getUnderlyingConfiguration xml/proc) true))
(def xdmnode (xml/compile-xml xmldoc))
@eerohele
eerohele / build.gradle
Last active August 29, 2015 14:05
A minimal Gradle buildfile for running a DITA-OT transformation
defaultTasks 'ditaOt'
def ditaHome = System.env.DITA_HOME
def antHome = System.env.ANT_HOME
task ditaOt << {
ant.java(classname: "org.apache.tools.ant.launch.Launcher", fork: "true", failonerror: "true") {
ant.jvmarg(value: "-Dant.library.dir=${antHome}/lib")
ant.classpath {
@eerohele
eerohele / root.ditamap
Created April 4, 2014 18:30
dita-ot/dita-ot #1596
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map id="id-1596" title="dita-ot/dita-ot #1596">
<topicref href="topic1.dita"/>
<topicref href="topic2.dita"/>
</map>
@eerohele
eerohele / life.xml
Last active August 29, 2015 13:57
dita-ot/dita-ot #1103
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="universe" xml:lang="en-us">
<title>Life, the Universe and Everything</title>
<body>
<section id="everything">
<title>Douglas Adams</title>
@eerohele
eerohele / default.ditaval
Created March 5, 2014 08:26
dita-ot/dita-ot #1454
<?xml version="1.0" encoding="UTF-8"?>
<val>
<prop action="flag" att="audience" val="my-audience">
<startflag>
<alt-text>my-audience (</alt-text>
</startflag>
<endflag>
<alt-text>)</alt-text>
</endflag>
</prop>
@eerohele
eerohele / root.ditamap
Last active August 29, 2015 13:56
dita-ot/dita-ot #1646
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map id="id-1646" title="dita-ot/dita-ot #1646">
<topicref href="topic1.dita" navtitle="Autobots" keys="autobots"/>
<topicref href="topic2.dita" keys="decepticons">
<topicmeta>
<navtitle>Decepticons</navtitle>
@eerohele
eerohele / root.ditamap
Created February 11, 2014 22:26
dita-ot/dita-ot #1217
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map id="id-1217" title="dita-ot/dita-ot #1217">
<topicref href="topic1.dita"/>
<topicref href="topic2.dita" print="no"/>
<topicref href="topic3.dita"/>
<reltable>