Skip to content

Instantly share code, notes, and snippets.


Matt Moretti werebus

  • UMass Transit Services (@umts)
  • Amherst, MA
View GitHub Profile
View kml-check.rb
#!/usr/bin/env ruby
require 'json'
require 'net/http'
require 'nokogiri'
require 'pry'
module Avail
def self.url(*path_components)
uri_array = [''] + path_components
werebus / favicon.ico
Last active Feb 28, 2018 decom splash
werebus / config_defaults.rb
Last active Aug 29, 2015
Getting knife configuration into chef-dk generator
View config_defaults.rb
#Pull in all of the values defined in the `chefdk` context in knife.rb
Chef::Config[:chefdk].configuration.each do |config_key, value|
ChefDK::Generator.context.send("#{config_key}=", value)
werebus /
Last active Aug 29, 2015
Script for making our Novatel 551L connect to Verizon

The following are instructions for setting up a Verizon-provided [NovaTel 551L][1] on a Debian-based Linux system. Our target system was an embedded ARM [TS-7800][2], which left us somewhat handicapped when it came to the version of Linux that we were able to use. We were able to install Debian Wheezy (7.7) on this device, but limited to the kernel sources that were provided by the manufacture (2.6.34).

If you have a more modern kernel available to you (>=3.4), look into [libqmi][3] and [ModemManager][4], which use the native QMI protocol to communicate with the modem instead of the AT command hacks featured

werebus / spells.sql
Last active Aug 29, 2015
Pathfinder spells -> postgres
View spells.sql
name varchar(255) unique not null,
school varchar(255),
subschool varchar(255),
descriptor varchar(255),
spell_level varchar(255),
casting_time varchar(255),
components varchar(255),
costly_components boolean,
range varchar(255),
View brew-services.rb
#!/usr/bin/env ruby -w
# brew-services(1) - Easily start and stop formulas via launchctl
# ===============================================================
# [<sudo>] `brew services` `list`<br>
# [<sudo>] `brew services` `restart` <formula><br>
# [<sudo>] `brew services` `start` <formula> [<plist>]<br>
werebus / letter.tex
Created Jul 11, 2013
Business letter - basically letter.cls, but with everything left-aligned
View letter.tex
\usepackage{fullpage} %1in margins on every page
{\raggedright \fromaddress \\*[2\parskip]%
\today \\*[2\parskip]%
\toname \\ \toaddress \par}%
werebus / memo.tex
Last active Dec 19, 2015
Basic Memo LaTeX layout
View memo.tex
\usepackage{fullpage} %1in margins on every page
\usepackage{parskip} %no paragraph indents, put a space inbetween instead
\centerline{\Large \bf MEMO}
werebus / stops_to_json.rb
Created Jun 27, 2013
gtfs 'stops.txt' file to geojson file
View stops_to_json.rb
require 'json'
require 'csv'
json = { 'type' => 'FeatureCollection',
'crs' => { 'type' => 'name',
'properties' => { 'name' => 'urn:ogc:def:crs:OGC:1.3:CRS84' } },
'features' => []
}'stops.txt', 'r') do |csv|
werebus / add-key.rb
Created Nov 25, 2012
An example SSH-key-adding class for Github
View add-key.rb
require 'rubygems'
require 'httparty'
require 'io/console'
class GithubApi
include HTTParty
base_uri ''
def initialize(username, password)
@auth = {:username => username, :password => password}