Skip to content

Instantly share code, notes, and snippets.

View purcell's full-sized avatar

Steve Purcell purcell

View GitHub Profile
Homebrew 0.9
==> Downloading http://www.complang.tuwien.ac.at/schani/metapixel/files/metapixel-1.0.2.tar.gz
Already downloaded: /Users/steve/Library/Caches/Homebrew/metapixel-1.0.2.tar.gz
/usr/bin/tar xf /Users/steve/Library/Caches/Homebrew/metapixel-1.0.2.tar.gz
==> make CC=/usr/bin/clang MACOS_LDOPTS=-L/usr/local/lib MACOS_CCOPTS=-Os -w -pipe -march=native -Qunused-arguments -I/usr/local/include
make CC=/usr/bin/clang MACOS_LDOPTS=-L/usr/local/lib MACOS_CCOPTS=-Os -w -pipe -march=native -Qunused-arguments -I/usr/local/include
/usr/bin/clang -Os -w -pipe -march=native -Qunused-arguments -I/usr/local/include -I/usr/X11R6/include -I/usr/X11R6/include/X11 -I. -Irwimg -Wall -O2 -DMETAPIXEL_VERSION=\"1.0.2\" -DRWIMG_JPEG -DRWIMG_PNG -DRWIMG_GIF -c metapixel.c
/usr/bin/clang -Os -w -pipe -march=native -Qunused-arguments -I/usr/local/include -I/usr/X11R6/include -I/usr/X11R6/include/X11 -I. -Irwimg -Wall -O2 -DMETAPIXEL_VERSION=\"1.0.2\" -DRWIMG_JPEG -DRWIMG_PNG -DRWIMG_GIF -c vector.c
/usr/bin/clang -Os -w -pi
@purcell
purcell / metapixel_1.0.2-libpng1.5.patch
Created April 2, 2012 09:08
Metapixel patch for compatibility with libpng 1.5
diff -u metapixel-1.0.2/debian/changelog metapixel-1.0.2/debian/changelog
--- metapixel-1.0.2.orig/rwimg/rwpng.c
+++ metapixel-1.0.2/rwimg/rwpng.c
@@ -57,19 +57,39 @@
data->end_info = png_create_info_struct(data->png_ptr);
assert(data->end_info != 0);
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
+ if (setjmp(png_jmpbuf((data->png_ptr))))
+#else
@purcell
purcell / gist:2358004
Created April 11, 2012 08:43
About the dangers of including emacswiki-hosted packages in Melpa

On 6 Mar 2012, at 21:17, Donald Curtis wrote: I was talking in #emacs today and realized that because EmacsWIKI has no authentication method, anyone could put in some very bad elisp to one of the packages that we package from EmacsWIKI. Sure, for the most part we believe everyone is trustworthy, but there is no validation or verification from our end. So as a rule I am migrating some of the EL packages to personal git repositories with a small script to update them periodically. I feel like this is a better approach and something I hadn't thought about.

Yeah, that's indeed a potential concern. I've been through all the same loops, from el-get to a home-rolled periodic-downloading solution like yours, and finally figured I just wanted everything in ELPA packages. The installed code is just as risky, but I gain in terms of installation convenience. I doubt anyone expects an ELPA archive to vouch for the safety of every package it hosts.

Now, one approach would be to have a separate repo for emacswi

@purcell
purcell / metal.md
Last active October 4, 2015 15:37
Some music suggestions

Instrumental progressive metal

  • Blotted Science - "The Machinations of Dementia"

    Extreme complexity, particularly the drum parts.

  • Canvas Solaris - "The Atomized Dream"

  • Gordian Knot - "Gordian Knot"

@purcell
purcell / nutty-bulgar-wheat.markdown
Created August 25, 2012 19:05
Nutty Bulgar Wheat with Herbs

Nutty Bulgar Wheat with Herbs

From Gordon Ramsay's Fast Food

Serves 4, warm or as a cold salad.

Ingredients

  • 300g bulgar wheat
@purcell
purcell / Classifier.hs
Created October 21, 2015 08:06
naive bayes
module Classifier
( Classifier(..)
, empty
, update
, union
, classify
, singleton
, scaled
, test
) where
// For races on fellrunner.org.uk, produce a string pasteable into my org-mode race list
(function() {
function parseRace() {
var $ = window.jQuery;
var race = {};
race.url = window.location.href;
race.name = $(".title_races").first().text().split(" – ")[1].trim();
var parseDateTime = function(s) {
@purcell
purcell / bug.org
Created February 28, 2013 11:02
org-mode html export bug

Running

@purcell
purcell / java-wrapper-runit
Created May 12, 2013 18:26
Java programs packaged up with Tanuki Software's "Wrapper" software are horribly unreliable when run via init.d scripts. Luckily it's easy to make such a program reliably runnable with runit or daemontools.
#!/usr/bin/env ruby
wrapper_conf = "wrapper.conf"
props = ARGF.readlines.reduce(Hash.new) do |info, line|
info[$1] = $2 if line =~ /^wrapper\.(.+?)\s*=\s*(.*)\s*$/
info
end
command = [props["java.command"]]