Skip to content

Instantly share code, notes, and snippets.

View morgant's full-sized avatar

Morgan Aldridge morgant

View GitHub Profile
@morgant
morgant / mime2mdwn
Created April 18, 2011 01:56
Convert MIME format wiki export (developed for PhpWiki exports) to Markdown
#!/bin/bash
#
# mime2mdwn - Convert MIME format wiki export (developed for PhpWiki exports) to Markdown
#
# globals
debug=false
# the actual heavy lifting
@morgant
morgant / google_convert_currency.php
Created February 26, 2011 03:31 — forked from SeanJA/google_convert_currency.php
Caching currency conversion using Google Calculator.
<?php
$currencyCache = array();
/**
* Looks for unquoted keys in a json string and fixes them ie: {a:"b"} => {"a":"b"}
* @param string $string A json string that is suspect
* @return string A valid json string
*/
function fix_json($string){
@morgant
morgant / clipcat
Created December 8, 2010 20:10
My updates to David Kendall's original, and now part of tools-osx (https://github.com/morgant/tools-osx).
#!/usr/bin/perl -w
#
# clipcat - Concatenate and print Text Clippings.
#
# v0.1 2010-11-18 - David Kendal <https://gist.github.com/705623>
# Initial version. Used with permission.
# v0.2 2010-12-08 - Morgan Aldridge <morgant@makkintosshu.com>
# Now concatenates multiple text clippings. Usage instructions.
#