Skip to content

Instantly share code, notes, and snippets.

@pearswj
pearswj / shef2csv.c
Created January 18, 2012 14:54
A short C program to parse tab separated UoS module timetable data to Google .csv format.
/* ---------------------------------------------------------------------------------
SHEF2CSV by Will Pearson
A simple C program for converting tab separated UoS module timetable data to Google
.csv format.
Usage: redirect stdin/stdout, e.g.
$ ./shef2csv < input.txt > output.csv
@pearswj
pearswj / agsm2.bst
Created March 19, 2012 22:08
Custom bibtex bibliography style file
% NOTE TO SELF: Place this file in "~/Library/texmf/bibtex/bst/".
% This custom bibliography style is based largely upon `agsm' (author below). It adds DOI and URL entries to bibliography items.
% Will Pearson 2012
% BibTeX standard bibliography style `agsm' (one of the harvard family)
% version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
% Copyright (C) 1991, all rights reserved.
% Copying of this file is authorized only if either
% (1) you make absolutely no changes to your copy, including name, or
# Maintainer: Gordin <9ordin @t gmail dot com>
# Contributor: dryes <joswiseman@gmail>
pkgname='sabnzbd-develop-git'
pkgver=20130207
pkgrel=1
pkgdesc='A web-interface based binary newsgrabber with NZB file support. develop branch'
arch=('any')
url='http://www.sabnzbd.org/'
license=('GPL')
*** PKGBUILD 2012-10-27 17:55:31.000000000 +0100
--- PKGBUILD.new 2013-02-07 09:27:30.000000000 +0000
***************
*** 2,17 ****
# Contributor: dryes <joswiseman@gmail>
pkgname='sabnzbd-develop-git'
! pkgver=20110930
pkgrel=1
pkgdesc='A web-interface based binary newsgrabber with NZB file support. develop branch'
diff --git a/PKGBUILD b/PKGBUILD.new
old mode 100755
new mode 100644
index 4f28743..66ea7df
--- a/PKGBUILD
+++ b/PKGBUILD.new
@@ -2,16 +2,16 @@
# Contributor: dryes <joswiseman@gmail>
pkgname='sabnzbd-develop-git'
@pearswj
pearswj / README.md
Last active December 12, 2015 09:58
RhinoPython Matrix Library
@pearswj
pearswj / sickbeard.scpt
Created August 18, 2013 12:16
A folder action script for Mac OS X that turns any folder into a "scan and process" directory for Sick-Beard. Avoids having Sick-Beard scan the directory every 10 minutes.
(*
add - post-process with sick-beard
This Folder Action handler is triggered whenever items are added to the attached folder.
The script will call Sick-Beard's sabToSickbeard script to post-process any episodes dropped into this folder.
Naked video files are automatically wrapped in a folder with the same name before Sick-Beard is called. Folders are processed as they are.
*)
property python_path : "/usr/local/bin/python"
property script_path : "/Applications/Sick-Beard/autoProcessTV/sabToSickbeard.py"
@pearswj
pearswj / meshCurvatureTensors.py
Created October 25, 2013 07:58
A RhinoPython script which computes the principal curvature directions at any given vertex on a mesh.
import Rhino
import scriptcontext
import System.Guid
#import System.Drawing
import math
from matrix import Matrix
def Torus(R, r, toroidal, poloidal):
"""Returns a parametrically constructs a torus mesh."""
mesh = Rhino.Geometry.Mesh()
import rhinoscriptsyntax as rs
import scriptcontext
import Rhino.Commands.Result as res
def arraylayers():
prefix = rs.GetString("Prefix for layers to array", "A")
X = rs.GetReal()
Y = rs.GetReal()
Z = rs.GetReal()
I am a CLA.