Skip to content

Instantly share code, notes, and snippets.

Dan Haywood danhaywood

View GitHub Profile
View forsub.sh
#!/bin/bash
#ls -d1 isis-* template > _all.txt
file="_all.txt"
for a in `cat $file | \
grep -v ^# `
do
pushd $a >/dev/null
@danhaywood
danhaywood / all.sh
Last active Nov 11, 2015
all.sh - script to update addons in bulk.
View all.sh
#!/bin/bash
#ls -d1 isis-* template > _all.txt
usage()
{
cat << EOF
usage: $0 options command
Runs the specified command for all uncommented files in _all.txt
@danhaywood
danhaywood / pml2adoc
Last active Aug 29, 2015
A Groovy script to convert pragprog PML (a DocBook-like language) to Asciidoc
View pml2adoc
def replacements = [
"<bookname[^>]*>([^<]+?)</bookname>":" '\$1'"
,"<acronym>([^<]+?)</acronym>":" _\$1_"
,"<emph>([^<]+?)</emph>":" *\$1*"
,"<url>([^<]+?)</url>":"link:\$1[]"
,"<keystroke>([^<]+?)</keystroke>":"kbd:[\$1]"
,"<variablename>([^<]*?)</variablename>":"`\$1`"
,"<classname>([^<]+?)</classname>":"`\$1`"
,"<dirname>([^<]+?)</dirname>":"`\$1`"
,"<filename>([^<]+?)</filename>":"`\$1`"
You can’t perform that action at this time.