Skip to content

Instantly share code, notes, and snippets.

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.
@pearswj
pearswj / externals.py
Created September 9, 2015 10:22
Recursively lists svn externals and their revisions.
#!/bin/env python
"""
externals.py
~~~~~~~~~~~~
Usage: `externals.py https://svn-server/repository`
`externals.py file:///svn/repository`
`externals.py working/copy`
This script was inspired by from http://stackoverflow.com/a/10286163/2464295.
@pearswj
pearswj / Edge.java
Last active September 11, 2015 09:45
Classes from an old processing library project for modelling manifold n-gon meshes.
/**
*
*/
package manifold;
import processing.core.*;
/**
* a class for edges
*/
@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
@pearswj
pearswj / mac.sh
Created November 13, 2015 16:57
A couple of simple scripts to handle the cloning/checking out of source from Git for CI.
if [ ! -d "./.git" ]; then
git init
git remote add origin git://github.com/Dan-Piker/Plankton
git config --add remote.origin.fetch "+refs/pull/*/merge:refs/remotes/origin/pull/*/merge"
fi
git fetch -q origin
git reset -q --hard $JANKY_SHA1
if [ -f script/cibuild ]; then
script/cibuild
else
*** 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'
# 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')