Skip to content

Instantly share code, notes, and snippets.

View mheadd's full-sized avatar

Mark Headd (He/Him) mheadd

View GitHub Profile
@mheadd
mheadd / datausa_census_api.rmd
Created July 11, 2016 14:42 — forked from lecy/datausa_census_api.md
Building Census Dataset in R Using datausa.io API
# Using the dataUSA.io API for Census Data in R
This gist contains some notes on constructing a query for census and economic data from the [DataUSA.io](http://datausa.io/) site. This is a quick-start guide to their API; for in-depth documentation check out their [API documentation](https://github.com/DataUSA/datausa-api/wiki/Overview).
A great way to learn how to structure a query is to visit a specific datausa.io page and click on the "Options" button on top of any graph, then select "API" to see the query syntax that created the graph.
![Analytics](https://ga-beacon.appspot.com/UA-27835807-2/gist-id?pixel)
## Example Use
@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>
@mheadd
mheadd / line-break-sms.php
Created May 18, 2011 16:50
Simple PHP script for SMSified that puts a line break in the SMS message.
<?php
// Include the SMSifed class.
require 'path/to/smsified.class.php';
// SMSified Account settings.
$username = "username";
$password = "password";
$senderAddress = "9999999999";
@mheadd
mheadd / outbound-node.js
Created December 10, 2010 19:13
A simple Node.js script to send SMS messages through the Tropo platform.
/**
* Simple outbound message launcher in Node.js
*
* You will need to have a Tropo scripting aplication set up
* to use this. See sample code below:
*
* message(msg, { to:number, network:"SMS" });
*
* Save this file in your Tropo account as message.js
*

Keybase proof

I hereby claim:

  • I am mheadd on github.
  • I am mheadd (https://keybase.io/mheadd) on keybase.
  • I have a public key ASDf5v_IBXcBfsgDRP1fwqY16evvJMtC_SLI6H_bMN1VpAo

To claim this, I am signing this object:

@mheadd
mheadd / find-biz-by-license.sh
Last active July 21, 2017 15:18
A simple script to pull down businesses by license type and display in a searchable HTML table.
##!/bin/bash
# License number (e.g., 3381).
LICENSE_TYPE=$1
# The name of the file to populate with records.
FILE_NAME=$2
echo "pri_contact_last_name, pri_contact_first_name, pri_contact_company_name, pri_contact_address1, pri_contact_city, pri_contact_state, pri_contact_zip, license_number, license_type_name, license_type_code" > $FILE_NAME
@mheadd
mheadd / dartfirststate_de_us_procs.sql
Created October 18, 2010 14:35
Stored Procedures for querying GFTS data from the State of Delaware in a MySQL database.
-- ----------------------------------------------------------------------------------------------------
-- Stored Procedures for querying GFTS data from the State of Delaware in a MySQL database.
--
-- Copyright 2010 Mark J. Headd
-- http://www.voiceingov.org
--
-- This file is free software; you can redistribute it and/or modify it under the terms of the
-- GNU Library General Public License as published by the Free Software Foundation; either version 2 of the
-- License, or (at your option) any later version.
-- This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
@mheadd
mheadd / index.html
Last active February 23, 2017 17:53
Template for Bootstrap
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
@mheadd
mheadd / gist:3946457
Created October 24, 2012 14:41 — forked from boutell/gist:3941578
Display a Google map with markers linking to pages
// Display a map with markers that link to other pages. Each marker must
// have latitude, longitude and slug properties. There must also be a
// a 'url' option which is used to build the links. The following
// wildcards are replaced in the url: ID (with the id), SLUG (with the
// slug property), PUBLISHED (with /year/month/day taken from published_at),
// and START (with /year/month/day taken from start_date). In other words,
// you can pass most array-hydrated Doctrine objects, including Apostrophe
// blog posts and events, and easily generate links back to them.
// The hover text title of the marker is taken from title if present,