Skip to content

Instantly share code, notes, and snippets.

View mattwigway's full-sized avatar

Matthew Wigginton Bhagat-Conway mattwigway

  • Department of City and Regional Planning, University of North Carolina at Chapel Hill
  • Durham, NC, USA
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Test of Google Hangouts on Air</title>
</head>
<body>
<h3>The video should appear below</h3>
</body>
</html>
@mattwigway
mattwigway / pen.py
Created November 26, 2012 00:42
Control the pen with the keyboard in LibreOffice Impress
# Hide and show the pen tool and change its color using the keyboard in
# LibreOffice Impress.
# Copyright 2012 Matt Conway
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
@mattwigway
mattwigway / gist:3694190
Created September 10, 2012 21:53
NYC WV graph builder
<!-- total: 79 feeds -->
<bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
<property name="url" value="http://gtfs.s3.amazonaws.com/pvta_20120820_0735.zip" />
<property name="defaultAgencyId" value="pvta" />
</bean>
<bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
<property name="url" value="http://gtfs.s3.amazonaws.com/port-authority-of-new-york-new-jersey_20110512_0300.zip" />
<property name="defaultAgencyId" value="port-authority-of-new-york-new-jersey" />
</bean>
<bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
@mattwigway
mattwigway / gist:3492444
Created August 27, 2012 21:32
beans for nyc
<bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
<property name="url" value="http://gtfs.s3.amazonaws.com/pvta_20120820_0735.zip" />
<property name="defaultAgencyId" value="pvta" />
</bean>
<bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
<property name="url" value="http://gtfs.s3.amazonaws.com/port-authority-of-new-york-new-jersey_20110512_0300.zip" />
<property name="defaultAgencyId" value="port-authority-of-new-york-new-jersey" />
</bean>
<bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
<property name="url" value="http://gtfs.s3.amazonaws.com/lanta_20120701_0310.zip" />
Table "dashboard.gtfsfeed"
Column | Type | Modifiers
------------------+-----------------------------+-----------
id | bigint | not null
agencyname | character varying(255) |
agencyurl | character varying(255) |
areadescription | character varying(255) |
country | character varying(255) |
dataexchangeid | character varying(255) |
dataexchangeurl | character varying(255) |
@mattwigway
mattwigway / bikeelevators.osm
Created August 20, 2012 20:40
Bikeable elevators (openplans/OpenTripPlanner #803)
<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='JOSM'>
<!--
This OSM file lays over downtown Portland, Oregon, and defines three paths:
1: Along SW 10th from SW Main to SW Morrison: two bike paths joined by a
bikeable elevator.
2: Along SW 11th: two paths, one bikeable and one not, joined by a bikeable
elevator.
3: Along SW 12th: two paths, neither bikeable, joined by a bikeable elevator.
@mattwigway
mattwigway / planWithStreetAlerts.xml
Created August 17, 2012 16:10
OTP plan with alerts on streets
<response><plan><date>2012-08-17T08:12:00-07:00</date><from><name>Northeast Webster Street</name><lon>-122.5696270558223</lon><lat>45.56027651423451</lat><geometry>{"type": "Point", "coordinates": [-122.5696270558223,45.56027651423451]}</geometry></from><to><name>Southwest Patton Road</name><lon>-122.73233588172435</lon><lat>45.497946765808614</lat><geometry>{"type": "Point", "coordinates": [-122.73233588172435,45.497946765808614]}</geometry></to><itineraries><itinerary><duration>3454000</duration><startTime>2012-08-17T08:12:00-07:00</startTime><endTime>2012-08-17T09:09:34-07:00</endTime><walkTime>3454</walkTime><transitTime>0</transitTime><waitingTime>0</waitingTime><walkDistance>16371.8775061131</walkDistance><elevationLost>0.0</elevationLost><elevationGained>0.0</elevationGained><transfers>-1</transfers><legs><leg mode="BICYCLE" route="" agencyTimeZoneOffset="0"><startTime>2012-08-17T08:12:00-07:00</startTime><endTime>2012-08-17T09:09:34-07:00</endTime><distance>16371.8775061131</distance><from><name>North
from sys import argv
import csv
writer = csv.writer(open('out.csv', 'w'))
print 'Weeks start on Monday.'
with open('out.csv', 'w') as out:
writer = csv.writer(out)
@6b0h075f4
Internal Server Error (500) for request GET /admin
Oops: ExceptionInInitializerError
An unexpected error occured caused by exception ExceptionInInitializerError: null
play.exceptions.UnexpectedException: Unexpected Error
at play.Invoker$Invocation.onException(Invoker.java:244)
at play.Invoker$Invocation.run(Invoker.java:286)
at Invocation.HTTP Request(Play!)
package models;
import javax.persistence.*;
import java.util.*;
import play.db.jpa.*;
import play.data.validation.*;
@Entity
public class NtdAgency extends Model {