This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>Horizon Chart</title> | |
<script type="text/javascript"> | |
function HorizonChart( canvas, barWidth, barColors ) { | |
this.canvas = canvas; | |
this.canvasHeight = +canvas.attributes.height.value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: print-text-two-column.sh file1 file2 ... | |
for f in "$@" | |
do | |
o="$(mktemp -q /tmp/$(basename $0).XXXXXX).pdf" | |
enscript \ | |
--header='$n||$%/$=' \ | |
--word-wrap \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns the timestamp parsed from the given ISO 8061 UTC string. Note | |
* that all of the following timestamp forms are supported: {@code | |
* | |
* YYYY := YYYY-01-01T00:00:00.0Z | |
* YYYY-MM := YYYY-MM-01T00:00:00.0Z | |
* YYYY-MM-DD := YYYY-MM-DDT00:00:00.0Z | |
* YYYY-MM-DD'T'HH := YYYY-MM-DDTHH:00:00.0Z | |
* YYYY-MM-DD'T'HH:MM := YYYY-MM-DDTHH:MM:00.0Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A couple of years ago I received a review copy of Bryant Terry's cookbook Vegan Soul Kitchen and a number of the recipes became part of my regular repertoire. | |
I've lost count of the number of times that my daughter and I have made the potato salad for parties and picnics and it's always extremely popular. I was very excited to receive a copy of his new book The Inspired Vegan. The first thing I tried from it was this roasted winter vegetable jambalaya. | |
Although this recipe is really simple and doesn't take a lot of tending, it does take a fair amount of time. It's a great mid-week dinner if you work at home, because you don't have to pay a lot of attention to it, but otherwise, it's probably best cooked on a weekend. | |
I also missed the direction that said the brown rice should be soaked over night, so mine got soaked for about an hour. The rice was a bit toothy, but that was okay. | |
Combine the vegetables straight into the roasting pan, rather than a bowl as it says in the recipe. Really, who needs an extra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This GIST has no other purpose than to demostrate that single-line perl scripts rock. | |
# This one extracts the time-stamp and duration from each matching record. | |
perl -ne 'if ( /(\d\d):(\d\d):(\d\d).*duration:\s*([\d,]+)ms/ ) { $time = ($1*60+$2)*60+$3; ( $duration = $4 ) =~ s/[^\d]//; printf( "%8d %5d\n", $time, $duration ); }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function split() { | |
file="$1" | |
dir="$2" | |
odd="$3" | |
even="$4" | |
pages=$(/usr/local/bin/pdfinfo "$file" | perl -ne 'print "$1" if /^Pages:\s+(\d+)/') | |
/usr/local/bin/pdfseparate "$file" "$dir/p-%d.pdf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( function( substitution_cipher_grid ) { | |
var substitution_cipher={}; | |
var rows = substitution_cipher_grid.split("."); | |
for ( var r = 0; r < rows.length; r++ ) { | |
var cells = rows[r].strip().split( /\s+/ ); | |
for ( var c = 0; c < cells.length; c++ ) { | |
substitution_cipher[cells[c]]=c+1 | |
} | |
} | |
var domain = window.location.host.split('.').reverse().splice(0,2).reverse().join('.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='utf-8' ?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html" /> | |
<title>jQuery Column Tree Table</title> | |
<link rel="stylesheet" href="http://jqueryui.com/themeroller/css/parseTheme.css.php?ffDefault=Lucida+Grande,+Lucida+Sans,+Arial,+sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'> | |
<!-- See http://blog.themeforest.net/tutorials/the-web-designers-guide-to-blogger-templates/ --> | |
<head> | |
<title><data:blog.pageTitle/></title> | |
<link href='http://com.andrewgilmartin.blogger.s3.amazonaws.com/blueprint_grid_150_20_18.css' rel='stylesheet' type='text/css'/> | |
<b:include data='blog' name='all-head-content'/> | |
<b:skin><![CDATA[ | |
BODY { padding: 0; margin: 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See http://remorse.nl/weblog/get_the_mousecursor_position_relative_to_an_element_with_prototype/ | |
function relativeEventLocation(event,container){ | |
if ( container == null ) { | |
container = Event.element(event); | |
} | |
//get the position of the container | |
var containerLeft = Position.page(container)[0]; | |
var containerTop = Position.page(container)[1]; | |