Skip to content

Instantly share code, notes, and snippets.

View philosophicles's full-sized avatar

Stuart Cuthbertson philosophicles

View GitHub Profile
@philosophicles
philosophicles / xld.sh
Created February 19, 2019 02:55
Call XLD application from command line, e.g. when a disk is inserted
#!/bin/sh
#Edit this line to define a path to XLD.app
XLD_APP="/Applications/XLD.app"
if [ ! -d "${XLD_APP}" ] ; then
echo "XLD.app not found"
exit;
fi
@philosophicles
philosophicles / room-allocation.pl
Created February 19, 2019 02:48
Crude prolog script to allocate people into rooms based on basic constraints
partners(stuart,georgie). partners(georgie,stuart).
partners(alan,barbara). partners(barbara,alan).
dislikes(georgie,barbara). dislikes(barbara,georgie).
dislikes(stuart,alan). dislikes(alan,stuart).
isman(A) :- member(A,[alan,chris,dave,ian,jack,stuart]).
iswoman(A) :- member(A,[barbara,ellie,fiona,georgie,helen]).
samesex(A,B) :- ( (isman(A),isman(B)) ; (iswoman(A),iswoman(B)) ), A \= B.
@philosophicles
philosophicles / diskbackup.sh
Created February 19, 2019 02:36
Shell script to rip a mounted/inserted CD to an ISO file
#!/bin/bash
## ArchiveCD.sh Script originally by Jayson Broughton of
## www.jaysonbroughton.com for LinuxJournal.com using
## elements from www.troubleshooters.com/linux/coasterless.htm
## Amended by SJ Cuthbertson 25/Nov/2012
## Purpose: rip the currently inserted CD to an ISO
get_variables()
@philosophicles
philosophicles / keybase.md
Created August 26, 2016 19:14
Keybase Proof

Keybase proof

I hereby claim:

  • I am philosophicles on github.
  • I am sjcuthbertson (https://keybase.io/sjcuthbertson) on keybase.
  • I have a public key whose fingerprint is BE68 1961 2A24 0DCC F005 E43D 8A6F 1CD9 D7B1 E2E0

To claim this, I am signing this object: