Skip to content

Instantly share code, notes, and snippets.

@tjdett
tjdett / checkout_coretardis.sh
Created November 30, 2011 23:47
Scripts to checkout MyTardis and contrib apps
#!/bin/bash
# MyTardis read-only (CoreTardis branch)
git clone git://github.com/mytardis/mytardis.git -b coretardis mytardis
# Checkout plugins
mkdir apps
git clone git://github.com/mytardis/hpctardis.git -b coretardis apps/hpctardis
git clone git://github.com/mytardis/microtardis.git -b coretardis apps/microtardis
#!/bin/bash
for i in {1..8}
do
openssl dgst -d -dss1 -sign elise_private_key.pem -out s800000${i}_signature.pem s800000${i}_digest.txt &&
openssl base64 -in s800000${i}_signature.pem -out s800000${i}_signature_base64.pem
done
@tjdett
tjdett / trac2md.rb
Created November 24, 2011 07:02
Convert Trac wiki syntax to Markdown
#!/usr/bin/env ruby
# Based on: https://gist.github.com/619537
body = STDIN.read
body.gsub!(/\{\{\{([^\n]+?)\}\}\}/, '`\1`')
body.gsub!(/\{\{\{(.+?)\}\}\}/m){|m| m.each_line.map{|x| "\t#{x}".gsub(/[\{\}]{3}/,'')}.join}
body.gsub!(/\=\=\=\=\s(.+?)\s\=\=\=\=/, '### \1')
body.gsub!(/\=\=\=\s(.+?)\s\=\=\=/, '## \1')
body.gsub!(/\=\=\s(.+?)\s\=\=/, '# \1')