Skip to content

Instantly share code, notes, and snippets.

View ToddG's full-sized avatar

ToddG ToddG

View GitHub Profile
@ToddG
ToddG / khan-academy-video.json
Created February 10, 2012 02:05
Khan Academy Video Feed v2
{
"author": "Todd Greenwood-Geer",
"categories": [
{
"name": "Geometry",
"videos": [
{
"desc": "introduction-to-angles",
"id": "2439OIVBgPg",
"title": "Introduction to angles",
@ToddG
ToddG / khan-academy-video.json
Created February 5, 2012 06:14
Khan Academy Video Feed
{'category': {'Statistics': {'videos': [{'desc': u'statistics--the-average', 'id': u'uhxtUt_-GyM', 'urls': [u'http://www.archive.org/download/KA-converted-uhxtUt_-GyM/uhxtUt_-GyM.mp4'], 'title': u'Statistics The Average'}, {'desc': u'statistics--sample-vs--population-mean', 'id': u'hsPCte_PcVA', 'urls': [u'http://www.archive.org/download/KA-converted-hsPCte_PcVA/hsPCte_PcVA.mp4'], 'title': u'Statistics Sample vs. Population Mean'}, {'desc': u'statistics--variance-of-a-population', 'id': u'6JFzI1DDyyk', 'urls': [u'http://www.archive.org/download/KA-converted-6JFzI1DDyyk/6JFzI1DDyyk.mp4'], 'title': u'Statistics Variance of a Population'}, {'desc': u'statistics--sample-variance', 'id': u'Qf3RMGXR-h8', 'urls': [u'http://www.archive.org/download/KA-converted-Qf3RMGXR-h8/Qf3RMGXR-h8.mp4'], 'title': u'Statistics Sample Variance'}, {'desc': u'statistics--standard-deviation', 'id': u'HvDqbzu0i0E', 'urls': [u'http://www.archive.org/download/KA-converted-HvDqbzu0i0E/HvDqbzu0i0E.mp4'], 'title': u'Statistics Standard Devi
@ToddG
ToddG / rtext2.erl
Created July 4, 2011 21:51
pushing server side data to client and displaying via raphaeljs
%% -*- mode: nitrogen -*-
-module (rtext2).
-compile(export_all).
-include_lib("nitrogen_core/include/wf.hrl").
-include_lib("nitrogen_core/include/google_chart.hrl").
-include("records.hrl").
%% http://raphaeljs.com/text-rotation.html
main() -> #template { file="./site/templates/raphael.html" }.
@ToddG
ToddG / rtext2.erl
Created July 4, 2011 20:46
logging text from server to client
%% -*- mode: nitrogen -*-
-module (rtext2).
-compile(export_all).
-include_lib("nitrogen_core/include/wf.hrl").
-include_lib("nitrogen_core/include/google_chart.hrl").
-include("records.hrl").
main() -> #template { file="./site/templates/raphael.html" }.
title() -> "Todd's <b>Raphael Text Log</b> Page".
@ToddG
ToddG / myraphaelpage.erl
Created July 4, 2011 17:40
playing with erlang, nitrogen, and raphael
%% -*- mode: nitrogen -*-
-module (myraphaelpage).
-compile(export_all).
-include_lib("nitrogen_core/include/wf.hrl").
-include_lib("nitrogen_core/include/google_chart.hrl").
-include("records.hrl").
main() -> #template { file="./site/templates/raphael.html" }.
title() -> "Todd's <b>Raphael</b> Page".
@ToddG
ToddG / mypage.erl
Created July 4, 2011 17:06
ordering issues w/wiring in nitrogen
%% -*- mode: nitrogen -*-
-module (myraphaelpage).
-compile(export_all).
-include_lib("nitrogen_core/include/wf.hrl").
-include_lib("nitrogen_core/include/google_chart.hrl").
-include("records.hrl").
main() -> #template { file="./site/templates/raphael.html" }.
title() -> "Todd's <b>Raphael</b> Page".
@ToddG
ToddG / mypage.erl
Created July 4, 2011 02:39
nitrogen framework web page with html5 video tag
%% -*- mode: nitrogen -*-
-module (mypage).
-compile(export_all).
-include_lib("nitrogen_core/include/wf.hrl").
-include("records.hrl").
main() -> #template { file="./site/templates/html5.html" }.
title() -> "Todd's <b>Html5</b> Page".
@ToddG
ToddG / blog.html
Created July 4, 2011 02:28
working html5 video tag in a static html file
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>Chapter 1 Examples</title>
<style type="text/css">
header,nav,footer,article {display:block;}
nav {float:left; width:20%;}
article {float:right; width:79%;}
footer {clear:both;}
@ToddG
ToddG / capitalize.erl
Created June 7, 2011 05:38
Capitalize and CamelCase Words
-module(capitalize).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
-include_lib("eunit/include/eunit.hrl").
%% ------------------------------------------------------------------
%% API Function Exports
%% ------------------------------------------------------------------
-export([
@ToddG
ToddG / abc.erl
Created May 8, 2011 17:06
example of a dynamic list
%% -*- mode: nitrogen -*-
-module (abc).
-compile(export_all).
-include_lib("nitrogen_core/include/wf.hrl").
-include("records.hrl").
main() -> #template { file="./site/templates/bare.html" }.
title() -> "Hello from abc.erl!".