Skip to content

Instantly share code, notes, and snippets.

@death
death / gist:203671
Created October 7, 2009 02:24 — forked from faried/gist:203476
(defadvice url-cookie-host-can-set-p (after reddit-cookie-fix activate)
(when (and (string= (ad-get-arg 0) "www.reddit.com")
(string= (ad-get-arg 1) "reddit.com"))
(setq ad-return-value t)))
(defclass random-world (world)
((initial-random-state :initarg :initial-random-state :accessor initial-random-state))
(:default-initargs :initial-random-state (make-random-state t)))
(defmethod shared-initialize :after ((world random-world) slot-names &rest initargs &key)
(declare (ignore slot-names initargs))
(let ((*random-state* (make-random-state (initial-random-state world))))
;; Add random objects to the world
))
@death
death / google-chart.lisp
Created January 18, 2010 04:31
A simple Google Chart wrapper for Common Lisp
;;;; A simple Google Chart wrapper for Common Lisp
;;;
;;; API reference: http://code.google.com/apis/chart/
;;;
;;; WARNING: Incomplete and buggy -- still has much to be done, e.g.:
;;;
;;; * more thorough testing (that won't be hard...)
;;;
;;; * handle spaces/newlines appropriately
@death
death / mingus-bind-plist patch
Created April 9, 2010 18:25
mingus-bind-plist patch
commit 9af6a8a4a9b64875ec17a128539f5c5f1ef8f2b9
Author: death <death@nessers.org>
Date: Fri Apr 9 21:23:41 2010 +0300
a working solution for the unexpected tags problem
The previous version dropped the variables for unexpected
tags, but not their values.
diff --git a/mingus.el b/mingus.el
@death
death / emacs.el
Created December 16, 2010 17:32
my leim dotemacs (w/ minor changes to protect the innocent)
;;;; General
(menu-bar-mode 0)
(scroll-bar-mode -1)
(set-default-font "-xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1")
(tool-bar-mode 0)
(setq inhibit-splash-screen t)
(setq initial-scratch-message nil)
(add-to-list 'load-path "~/emacs/")
@death
death / gist:1172340
Created August 25, 2011 23:53
mingus-goto-current-song patch
From 3c6d41708a3bf34bb6350cab017f935701ac38ef Mon Sep 17 00:00:00 2001
From: death <death@nessers.org>
Date: Fri, 26 Aug 2011 02:49:36 +0300
Subject: [PATCH] correctly handle nil song-number when moving point to current song
---
mingus.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mingus.el b/mingus.el
@death
death / gist:2316075
Created April 6, 2012 02:22
DCPU-16 Lisp implementation
(defpackage #:dcpu-16
(:use #:cl)
(:export
#:make-ram #:ram-read #:ram-write #:ram-size
#:execute #:debug
#:load-program #:assemble-program
#:set #:add #:sub #:mul
#:div #:mod #:shl #:shr
#:and #:bor #:xor #:ife
#:ifn #:ifg #:ifb #:jsr
@death
death / backtrace.txt
Created October 19, 2015 20:28
helm-mingus
Debugger entered--Lisp error: (wrong-type-argument stringp (file "blues/Peter Green/1979 - In The Skies/03-A Fool No More.mp3" Last-Modified "2014-01-15T23:23:29Z" Time 467 Artist "Peter Green" Title "A Fool No More" Album "In The Skies" Track "03" Date "1998" Genre "Blues"))
string-match("[[*?]" (file "blues/Peter Green/1979 - In The Skies/03-A Fool No More.mp3" Last-Modified "2014-01-15T23:23:29Z" Time 467 Artist "Peter Green" Title "A Fool No More" Album "In The Skies" Track "03" Date "1998" Genre "Blues") nil)
helm--compute-marked((file "blues/Peter Green/1979 - In The Skies/03-A Fool No More.mp3" Last-Modified "2014-01-15T23:23:29Z" Time 467 Artist "Peter Green" Title "A Fool No More" Album "In The Skies" Track "03" Date "1998" Genre "Blues") ((match helm-mm-exact-match helm-mm-match) (name . "All songs") (candidates . helm-mingus-all-candidates) (action ("Queue" . helm-mingus-queue-song))) t)
helm-marked-candidates(:with-wildcard t)
(mapconcat (function (lambda (song) (let ((file (getf song (quo
@death
death / gist:6740474
Created September 28, 2013 09:52
Windows executable subsystem hack
(defpackage #:subsystem.hack
(:use #:cl)
(:export #:patch-subsystem)
(:import-from #:nibbles
#:read-ub16/le #:read-ub32/le #:write-ub16/le))
(in-package #:subsystem.hack)
(defun subsystem-position (stream)
(file-position stream 0)
@death
death / python-struct-hack.lisp
Created December 31, 2009 22:31
python.struct hack in Common Lisp
(defpackage #:pack
(:use #:cl #:alexandria)
(:export
#:pack
#:pack-into
#:unpack
#:calc-size
#:compile-struct-string
#:pack*
#:unpack*