Skip to content

Instantly share code, notes, and snippets.

View robstenzinger's full-sized avatar

Rob Stenzinger robstenzinger

View GitHub Profile
@robstenzinger
robstenzinger / deck-footer-title-menu.js
Created April 1, 2014 02:31
modifies a revealJS presentation, adds a deck title and menu of links in the lower left of the view port
"""
Post-build update a revealJS deck
- adds a base target, jQuery, and a main.js include script block
technique from:
http://stackoverflow.com/questions/39086/search-and-replace-a-line-in-a-file-in-python
"""
import fileinput
import sys
@robstenzinger
robstenzinger / build-deck.sh
Created April 1, 2014 02:20
build and open a revealjs deck via pandoc
# build and open a revealjs deck via pandoc
# pandoc: convert markdown deck to revealjs deck
# requires a subfolder named "reveal.js"
pandoc -t revealjs -s deck.md -o deck.html
# optional post-build step, update the deck
# python update-deck.py
# open in default web browser
@robstenzinger
robstenzinger / build-web.sh
Created January 4, 2014 21:19
Build the web preview (useful for testing and debugging) for my ebook. It's essentially a way to use Pandoc to convert Markdown files into a static web site. Kept the file names consistent to the epub book building process to maintain hyperlinks across chapters in both formats.
# build-web.sh
# prep the output directories
mkdir ./_web/illustrations/
mkdir ./_web/audio/
# copy assets to the web structure
rsync --verbose --update --recursive --progress --times ./illustrations/ ./_web/illustrations/
rsync --verbose --update --recursive --progress --times ./audio/ ./_web/audio/
@robstenzinger
robstenzinger / build-epub.sh
Created January 4, 2014 21:14
An ebook epub build script using mostly Pandoc. I use this one to build "Game Construction Kit: Underwater Tomato Ninja".
# build-epub.sh (in epub)
# prep the output directories
mkdir ./_epub/illustrations/
mkdir ./_epub/audio/
# copy assets to the epub structure
rsync --verbose --update --recursive --progress --times ./illustrations/ ./_epub/illustrations/
rsync --verbose --update --recursive --progress --times ./audio/ ./_epub/audio/
cp "epub.css" "./_epub/epub.css"
@robstenzinger
robstenzinger / list-achievements.sh
Created January 4, 2014 21:08
Shell command, looks for lines of text in .md files in the current directory containing the text "ACHIEVEMENT:", then writes the output/results to a separate file.
# looks for lines of text in .md files in the current directory containing the text "ACHIEVEMENT:"
# > then writes the output/results to a separate file
grep -h -w -i "ACHIEVEMENT:" ./*.md > ./achievements/achievements.md
@robstenzinger
robstenzinger / opml2markdown.py
Created August 2, 2013 23:59
A utility that helps me with taking an OPML file, often a first draft of most any document or blog post I write, then transform it into Markdown.
"""
opml2markdown.py -- A command line tool to transform OPML files into markdown.
Written by Rob Stenzinger
License: MIT
http://opensource.org/licenses/MIT
Usage:
python opml2markdown.py PATH-TO-OMPL-FILE OPTIONAL-HEIRARCHY-MAPPED-MARKDOWN
@robstenzinger
robstenzinger / atom-xml-to-wordpress-export.html
Created February 24, 2012 05:02
Script to transform my blog's ATOM feed to Wordpress Export format to assist in moving to new CMS.
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<script>
/*
Script to transform my blog's ATOM feed to Wordpress Export format to assist in moving to new CMS.