Skip to content

Instantly share code, notes, and snippets.

View infotexture's full-sized avatar

Roger Sheen infotexture

View GitHub Profile
@infotexture
infotexture / pre-commit.sample.sh
Last active January 4, 2016 14:39
Sample Git `pre-commit` hook to build DITA output before committting and reject the changes if build fails
#!/bin/sh
#
# Get the absolute path of the `.git/hooks` directory
export GIT_HOOKS=`cd "\`dirname "\\\`readlink "$0" || echo $0\\\`"\`" && pwd`
# Set the absolute path of the build directory
export BUILD_FILES="$GIT_HOOKS/../../build-files/"
# Set the absolute path of the DITA home directory
export DITA_HOME="$BUILD_FILES/../bin/dita-ot/"
# Set the absolute path of the DITA home directory again (weird, but necessary)
export DITA_DIR="$BUILD_FILES/../bin/dita-ot/"
@infotexture
infotexture / keybase.md
Created September 11, 2016 11:40
Keybase.io GitHub identity proof

Keybase proof

I hereby claim:

  • I am infotexture on github.
  • I am infotexture (https://keybase.io/infotexture) on keybase.
  • I have a public key ASA5FXAWGFzIxTeuYBHqoLXTF1tX3EN9JfKKI8IGGqjegAo

To claim this, I am signing this object:

@infotexture
infotexture / PR-3379-fo-tests.md
Last active October 11, 2019 16:31
Sample FO output for various index markup options
@infotexture
infotexture / dita-ot-rng-catalog.xml
Created November 27, 2020 20:14
DITA-OT RELAX NG Schemas
<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<!-- Map an absolute RELAX NG schema reference to a location relative to this catalog -->
<uri name="https://www.dita-ot.org/project" uri="dita/DITA-OT3.x/resources/project.rnc"/>
<uri name="https://www.dita-ot.org/plugins" uri="dita/DITA-OT3.x/resources/plugin.rnc" />
</catalog>
@infotexture
infotexture / net.infotexture.autobuild_hourly.plist
Last active March 9, 2022 20:23
Sample Mac OS X `launchd` script to run DITA builds hourly
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.infotexture.autobuild_hourly</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/username/projectdir/scripts/run-dita-build.sh</string>
@infotexture
infotexture / net.infotexture.autobuild_watcher.plist
Created January 26, 2014 16:12
Sample Mac OS X `launchd` script to watch a folder and run DITA builds whenever files change
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>net.infotexture.autobuild_watcher</string>
<key>ProgramArguments</key>
<array>