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 / Dockerfile
Created March 9, 2021 15:02
Dockerfile to run Drupal 7
FROM php:5.5-apache
RUN a2enmod rewrite
# install the PHP extensions we need
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install zip \
&& docker-php-ext-install gd mbstring pdo pdo_mysql pdo_pgsql
@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 / data-officer-position.md
Last active September 1, 2020 23:41
A brief description for the job of Municipal Chief Data Officer

Municipal Chief Data Officer

Description:

The Municipal Chief Data Officer (CDO) is a 'C' level executive in the city's technology leadership with primary responsibility for implementing the city's open data / open government plans. Open data is an important cornerstone to broader government transparency efforts, and the CDO is responsible for developing and expanding open data activities across city departments and agencies, and coordinating with other municipal leaders on broader transparency efforts.

The CDO is the face of the city's open data effort, and will be an evangelist for open data and innovation both inside and outside municipal government.

Responsibilities:

@mheadd
mheadd / Main.cs
Created June 20, 2011 17:38
C# console application to send an SMS message through SMSified
using System;
using System.Text;
using System.Net;
using System.IO;
namespace smsifiedexample
{
class MainClass
{
public static void Main (string[] args)
@mheadd
mheadd / get-app-guid.sh
Last active May 3, 2020 21:58
Get usage stats for a cloud.gov application
#!/bin/bash
#
# A simple script to get a GUID for an applications. Note - assumes you have jq installed.
#
# The GUID for the app you want to check
APP_NAME=$1
if [[ ! $(which jq) ]]; then
echo "Error: You must have the jq utility installed to run this script. https://stedolan.github.io/jq/" >&2
@mheadd
mheadd / fastagi.js
Created October 21, 2010 15:18
Node.js script to execute FastAGI application
// Include required modules.
var net = require('net');
var sys = require('sys');
// Create a TCP server and listen on FastAGI port.
var server = net.createServer();
server.listen(4573, '127.0.0.7');
// Add a listener for new connections.
server.addListener('connection', fastAGI);
@mheadd
mheadd / 1-Dockerfile
Last active February 11, 2020 17:51
A set of files that can be used to set up a MS SQL Server instance and populate a table with test data
# Install base image
FROM microsoft/mssql-server-linux
# Copy over the SQL file to set up the database
COPY setup.sql /
# Copy over the file with sample data.
# This data is from https://people.sc.fsu.edu/~jburkardt/data/csv/csv.html
COPY data.csv /
@mheadd
mheadd / get-issues.sh
Last active November 27, 2019 15:33
Fetch closed issues from a Github repo
##!/bin/bash
## The name of the Github account user or org
OWNER=$1
## The name of the repo
REPO=$2
## Append the file with listd of issues
curl -s "https://api.github.com/repos/$OWNER/$REPO/issues?page=1&per_page=100&state=closed" \
@mheadd
mheadd / hello.cbl
Last active November 27, 2019 02:34
Hello world - Node.js, Express and COBOL
IDENTIFICATION DIVISION.
PROGRAM-ID. CLIOPTIONS.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 argv pic x(100) value spaces.
PROCEDURE DIVISION.
ACCEPT argv FROM argument-value
@mheadd
mheadd / dartfirststate_de_us.sql
Created October 7, 2010 17:13
A SQL script for importing GFTS data from the State of Delaware into a MySQL database.
-- -------------------------------------------------------------------------------------------------------
-- A SQL script for importing GFTS data from the State of Delaware into 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;