Skip to content

Instantly share code, notes, and snippets.

Freetype yearns for /opt/local/lib/libz.dylib , but (No such file or directory)
bash-3.2# uname -a
Darwin d72.cozy.org 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
bash-3.2# port selfupgrade
Unrecognized action "selfupgrade"
bash-3.2# port selfupdate
---> Updating the ports tree
---> Updating MacPorts base sources using rsync
MacPorts base version 1.8.1 installed,
#!/usr/bin/env python
# With luck this illustrates 2 things r. keyczar
# 1. How to convert an RSA private key into a RSA public key.
# 2. How to convert RSA keys of either kind into their PEM
# equivaletn.
import sys
try:
import simplejson as json
@bhyde
bhyde / gist:5355435
Last active December 16, 2015 01:29
Load this into your lisp, and then goto http://localhost:8081/SyntaxHighlighter-1 for an example of using Alexgor Batchev javascript, client side, syntax highlighter via Common Lisp, Hunchentoot, cl-who, and parenscript
; -*- Mode: Common-Lisp -*
;;; A stand alone example of using Alex Batchev's javascript, client side,
;;; syntax highlighter <http://alexgorbatchev.com/SyntaxHighlighter/>
;;; via Common Lisp, Hunchentoot, cl-who, and parenscript.
(ql:quickload '(hunchentoot cl-who parenscript))
(defpackage #:script-highlighter-example
(:use #:common-lisp #:hunchentoot #:cl-who #:parenscript))
@bhyde
bhyde / gist:5383182
Last active December 16, 2015 05:18
# Quick start script for heroku-buildpack-ccl64-example1
# Pipe this into bash.
function LOG(){
cat <<EOF
=== LOG: $* ===
EOF
}
@bhyde
bhyde / gist:5673492
Created May 29, 2013 20:18
Snarf historical prices from ebay... via common lisp
(in-package "CL-USER")
(let ((*print-case* :upcase))
(ql:quickload '(#:fare-memoization #:parse-number
#:optima #:optima.ppcre #:fare-quasiquote-optima
#:drakma #:closure-html)))
(defpackage #:eb
(:use #:common-lisp #:fare-memoization #:parse-number
#:optima #:optima.ppcre
@bhyde
bhyde / gist:5722301
Created June 6, 2013 15:15
An alternate binding for slime's slime-documentation-lookup-function. Uses l1sp.org if invoked with a prefix arg.
(defun slime-hyperspec-plus-l1sp-lookup (symbol-name)
"The usual hyperspec lookup, but with a prefix arg uses l1sp.org instead"
(interactive (list (let* ((symbol-at-point (slime-symbol-at-point))
(stripped-symbol
(and symbol-at-point
(downcase
(common-lisp-hyperspec-strip-cl-package
symbol-at-point)))))
(if (and stripped-symbol
(or current-prefix-arg
@bhyde
bhyde / redirect.md
Last active December 18, 2015 03:59
Code to scrap cl-ppcre's doc page and build the redirect table as used by l1sp.org.
@bhyde
bhyde / slime-documentation-search.el
Last active December 18, 2015 05:48
Hand off slime doc search to a website, bound to C-c C-d C-s, defaults to quickdocs.org.
;;; -*- lexical-binding: t -*-
(define-slime-contrib slime-documentation-search
"Hand off a documenation search to a web site."
(:authors "Ben Hyde <bhyde@pobox.com>")
(:license "GPL")
(:on-load
(define-key slime-doc-map "\C-s" 'slime-documention-search)
(define-key slime-doc-map "s" 'slime-documention-search)))
@bhyde
bhyde / dump-doc.lisp
Last active December 18, 2015 08:29
(in-package #:cl-user)
(defun display-doc-of-package-exports (package)
"Simple code to display the documenation for a package's exports."
(flet ((arglist (sym)
#+ccl (ccl:arglist sym)
#-ccl ()))
(let ((*package* (find-package package)))
(do-external-symbols (s *package*)
(loop
@bhyde
bhyde / slime-plz-use-asdf-cache.el
Created June 17, 2013 19:46
A few lines of elisp to instruct slime to ask swank to use the asdf fasl cache directories when it compiles things. For example using C-c C-k.
;;; elisp that instructs slime/swank to use the ASDF cache for fasl files.
;;; add this to your emacs init file; and the magic happens.
(defun setup-to-save-swank-fasls-in-asdf-cache ()
;; based on http://article.gmane.org/gmane.lisp.slime.devel/11080
(slime-eval-print "
(flet ((find-fasl (path options)
(declare (ignore options))
(let ((fasl-path
(asdf:apply-output-translations
(compile-file-pathname path))))