Skip to content

Instantly share code, notes, and snippets.

View mheadd's full-sized avatar

Mark Headd mheadd

View GitHub Profile
@mheadd
mheadd / phono.html
Created October 10, 2011 17:12
Simple phono web page.
<html>
<head>
<script src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script src="http://s.phono.com/releases/0.2/jquery.phono.js"></script>
</head>
<body>
<input id="call" type="button" disabled="true" value="Loading..." />
<span id="status"></span>
@mheadd
mheadd / next-septa.txt
Created October 8, 2011 14:10
Thoughts / docs from Reed Lauber - creator of NextSepta
The NEXT-Septa project is here:
https://github.com/reedlauber/Next-Septa
Specifically, the import code is here:
https://github.com/reedlauber/Next-Septa/blob/master/lib/tasks/import_gtfs.rake
It's a ruby rake task, so if someone wanted to use it in their own Rails project, then can run it with a few optional arguments. e.g....
rake import_gtfs // imports everything (currently default to buses only)
rake import_gtfs[routes] // imports just routes
rake import_gtfs[routes, rail] // imports routes for rail lines, not buses
@mheadd
mheadd / launch.txt
Created October 6, 2011 18:01
Simple example showing how to call an number and then transfer to another number with custom caller ID.
curl "http://api.tropo.com/1.0/sessions?action=create&token=your-token-goes-here"
@mheadd
mheadd / outbound.js
Created September 29, 2011 16:26
Node.js sample showing how to use the Tropo Session API to send an SMS message.
/**
* A simple example demonstrating how to use the Tropo Session API to send a text message.
*
* 1. Install Tropo WebAPI module.
* npm install tropo-webapi
*
* 2. Create a Tropo scripting app in your Tropo account with the following code:
* message(msg, { to:number, network:'SMS' });
*
* 3. The values for 'msg' and 'number' are sent to Tropo from your Node.js script (see below).
@mheadd
mheadd / civic-hacking-quarterly-fall-2011.md
Created September 20, 2011 01:39 — forked from luigi/civic-hacking-quarterly-fall-2011.md
Civic Hacking Quarterly - Fall 2011

There's a lot going on in the world of open government and open data. And it's tough to keep up. Once a quarter, we'll do our best to round up all the events and challenges going on that the Sunlight Labs community may be interested in.

If we've missed something going on through the end of the year, let us know in the comments. If you're planning an event for 2012, send Luigi a quick note.

Events

  • Hack4Reno, September and October, Reno. The biggest little city in the world is hosting a series of events in the next month designed to build up a community of civic hackers, then caps it off with a 24 hour hackathon on October 15.
  • Hacks/Hackers at ONA 11, Sep. 22, Boston. A day of hacking as the Online News Association's annual conference kicks off.
  • Code 4 Country, Sep. 24-25, Washington, D.C. and Moscow: The first collabora
@mheadd
mheadd / septa-stops.xml
Created August 30, 2011 10:56
SRGS Grammar in XML format for SEPTA Stations
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Copyright (c) 2011 Mark J. Headd (http://www.voiceingov.org) Permission
is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions: The above copyright notice
and this permission notice shall be included in all copies or substantial
@mheadd
mheadd / tropo.js
Created August 18, 2011 20:00
Sample Tropo app written in Node.js with the Express Framework.
/**
* Sample Tropo app written in Node.js with the Express Framework.
*/
var tropo = require('tropo-webapi');
var express = require('express');
var port = process.ARGV[2] || 8000;
var app = express.createServer();
@mheadd
mheadd / config.js
Created August 17, 2011 15:44
Node Knockout Demo Application
/**
* Enter your configuration details in this file.
*/
// Details of your CouchDB instance.
exports.couchdb = {
userid : '',
password : '',
host : 'http://127.0.0.1',
port : '5984',
@mheadd
mheadd / Ask.cs
Created August 11, 2011 18:49
C# /ASP.NET code behind showing how to process and use Tropo Result object.
using System;
using TropoCSharp.Tropo;
namespace TropoDemo
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// Create a new instance of the Tropo object.
@mheadd
mheadd / weight.xml
Created August 2, 2011 00:33
SRGS grammar in XML format for capturing weight information.
<?xml version="1.0" encoding="ISO-8859-1"?>
<grammar xmlns="http://www.w3.org/2001/06/grammar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd"
version="1.0" xml:lang="en-US" mode="voice" root="main">
<!-- Main gramar rule -->
<rule id="main" scope="public">
<item>
<ruleref uri="#first" />
</item>