Skip to content

Instantly share code, notes, and snippets.

Kurt Raschke kurtraschke

Block or report user

Report or block kurtraschke

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kurtraschke
kurtraschke / parsecallno.py
Created Sep 1, 2010
Regular expression and script for parsing and sorting Library of Congress Classification call numbers
View parsecallno.py
import re
myfile = open('list', 'r')
callnos = myfile.readlines()
p = re.compile("""^(?P<aclass>[A-Z]{1,3})
(?P<nclass>\\d{1,4})(\\ ?)
(\\.(?P<dclass>\\d{1,3}))?
(?P<date>\\ [A-Za-z0-9]{1,4}\\ )?
@kurtraschke
kurtraschke / nrc-atom.pl
Created Nov 22, 2010
NRC ENR Atom feed generator
View nrc-atom.pl
#!/usr/local/bin/perl -T
#NRC ENR Atom feed generator
#Kurt Raschke
#kurt@kurtraschke.com
#Resources:
#http://linuxgazette.net/108/oregan2.html
#http://linuxgazette.net/109/oregan.html
#http://ttul.org/repos/cpan/trunk/Kwiki-Atom/lib/Kwiki/Atom.pm
@kurtraschke
kurtraschke / newsmb.sh
Created Dec 23, 2010
Big Brother (bb4.com) script for monitoring SMB servers
View newsmb.sh
#!/bin/sh
#set -x
#
###################################################################
# smb.sh Charles Gillanders charles.gillanders@toucan.ie
# Modified by Kurt Raschke <kurt@kurtraschke.com>:
# No longer requires a valid user/pass for each machine
# Minor bug-fixing; better handling of the "dialup" and "nonetpage" directives
#
# A Big Brother External Script
@kurtraschke
kurtraschke / shortdoi.applescript
Created Jun 3, 2011
Set BibDesk URLs to ShortDOI shortcuts
View shortdoi.applescript
(*
Set BibDesk URLs to shortDOI shortcuts
Kurt Raschke
kurt@kurtraschke.com
Licensed under the BSD license
*)
on run
tell application "BibDesk"
tell document 1
@kurtraschke
kurtraschke / twitterlinks.js
Created Jul 26, 2011
Google Apps Script to turn Twitter usernames into links
View twitterlinks.js
@kurtraschke
kurtraschke / updatetweets.js
Created Jul 26, 2011
Google Apps Script to set cell comment to latest Tweet
View updatetweets.js
function setComments() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var twitterDataRange = ss.getRangeByName("Twitter3");
vals = twitterDataRange.getValues();
for (i in vals) {
var row = vals[i];
for (j in row) {
var col = vals[i][j];
if (col.length > 0) {
@kurtraschke
kurtraschke / README.markdown
Created Aug 13, 2011
XSLT stylesheet to translate WMATA Metrobus positions to KML
View README.markdown

Get an API key from developer.wmata.com, and put it in buspos.sh.

If you don't happen to have a web server running, but you do have Python, do the following:

  1. chmod +x buspos.sh
  2. chmod a+r bus.xslt
  3. mkdir cgi-bin
  4. mv buspos.sh bus.xslt cgi-bin
  5. python -m CGIHTTPServer 8001
@kurtraschke
kurtraschke / subviewer.pde
Created Sep 6, 2011
Render archived MTA NYCT A Division ATS data
View subviewer.pde
import processing.video.*;
MovieMaker mm;
OSMMercator om;
PFont theFont;
void setup() {
size(1280, 720);
smooth();
@kurtraschke
kurtraschke / subviewer1.py
Created Sep 6, 2011
Two approaches to visualizing MTA NYCT A Divsion ATS data in Google Earth
View subviewer1.py
from csv import DictReader
from collections import defaultdict
import xml.etree.ElementTree as etree
from datetime import datetime
import pytz
from gtfs import Schedule
from gtfs.entity import Stop
@kurtraschke
kurtraschke / test.html
Created Sep 15, 2011
Demonstration of polling disconnect in socket.io
View test.html
<html>
<head>
<script src="/socket.io/socket.io.js"></script>
<script>
var connectTime;
var socket = io.connect('/', {transports: ['websocket', 'htmlfile', 'xhr-multipart', 'xhr-polling', 'jsonp-polling']});
socket.on('connect', function(){
console.log('connected');
connectTime = new Date().getTime();
You can’t perform that action at this time.