Skip to content

Instantly share code, notes, and snippets.

View mathew-hall's full-sized avatar

Mathew Hall mathew-hall

View GitHub Profile
@mathew-hall
mathew-hall / bibtex.csl
Created April 10, 2014 15:52
CSL file to produce BibTeX records with Papers.app cite keys. Based on Zotero stylesheet by Markus Schaffner and Richard Karnesky.
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
<info>
<title>BibTeX generic citation style with Papers.app CiteKeys</title>
<id>http://www.zotero.org/styles/bibtex</id>
<link href="http://www.zotero.org/styles/bibtex" rel="self"/>
<link href="http://www.bibtex.org/" rel="documentation"/>
<author>
<name>Markus Schaffner</name>
</author>
@mathew-hall
mathew-hall / client.R
Created March 2, 2014 11:20
R Vircurex API wrapper
library(rjson)
library(RCurl)
#Magic: this function chooses the endpoint type based on the name
# of the caller.
# Arguments are a list of values which are matched
# with their named defaults.
request <- function(added_args, named_args){
#Matching nameless arguments to named arguments in declaration:
@mathew-hall
mathew-hall / PLS2Spotify.py
Created February 7, 2013 17:32
Searches Spotify via spotimeta for each track name in a list.
#!/usr/bin/python
import sys
import re
import spotimeta
import time
import codecs
from glob import glob
@mathew-hall
mathew-hall / GraphView.java
Created July 3, 2012 14:03
Prefuse basic graph
/*
* Code from http://stackoverflow.com/questions/7233956/creating-data-in-prefuse
*/
package ui.mainview;
import prefuse.Constants;
import prefuse.Display;
import prefuse.Visualization;
import prefuse.action.ActionList;