Skip to content

Instantly share code, notes, and snippets.

View purcell's full-sized avatar

Steve Purcell purcell

View GitHub Profile
@purcell
purcell / emacs-osx-srgb.patch
Last active June 19, 2018 16:34
Make Emacs on OSX treat all RGB colors as being within the sRGB color space
commit 3b63b2c6e9e93adab09eace60750ed981a8e528f
Author: Steve Purcell <[email protected]>
Date: Sat Dec 21 11:44:12 2013 +0000
Treat hex colors as sRGB (see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8402)
diff --git a/src/nsterm.m b/src/nsterm.m
index 733c05a..0c79186 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@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 / elpa-compare.el
Created June 27, 2012 12:42
Compare melpa and marmalade package lists
(defun elpa/package-names (archive-name)
(let* ((archive-contents (expand-file-name (concat "archives/" archive-name "/archive-contents")
package-user-dir))
(names (mapcar 'car (rest (pb/read-from-file archive-contents)))))
(sort names 'string<)))
(defun list-minus (a b)
(let ((result (copy-seq a)))
(dolist (e b)
(delq e result))
@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 / 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 / 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
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
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Users/steve/bin/proxy-config
==> 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/llvm-gcc MACOS_LDOPTS=-L/usr/local/lib MACOS_CCOPTS=-Os -w -pipe -march=core2 -msse4.1 -I/usr/local/include
make CC=/usr/bin/llvm-gcc MACOS_LDOPTS=-L/usr/local/lib MACOS_CCOPTS=-Os -w -pipe -march=core2 -msse4.1 -I/usr/local/include
/usr/bin/llvm-gcc -Os -w -pipe -march=core2 -msse4.1 -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/llvm-gcc -Os -w -pipe -march=core2 -msse4.1 -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/llvm-gcc -Os -w -pipe -march=core2 -msse4.1 -I/usr/local/incl