Skip to content

Instantly share code, notes, and snippets.

@rlb3
rlb3 / Emacs configure line
Last active August 29, 2015 19:24
configure line to compile emacs
./configure --prefix=/opt/emacs --with-jpeg=no --with-gif=no --with-tiff=no --with-x=no
COPYFILE_DISABLE=true
PATH=~/bin:/opt/git/bin:/opt/emacs/bin:/opt/perl/bin:/opt/local/bin:$PATH:/usr/local/mysql/bin:/Library/PostgreSQL/8.3/bin/:/Users/robert/.gem/ruby/1.8/bin
LSCOLORS=gxfxcxdxbxegedabagacad
EDITOR="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c -n --alternate-editor=/usr/bin/emacs"
GIT_EDITOR="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c --alternate-editor=/usr/bin/emacs"
PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
export PATH COPYFILE_DISABLE LSCOLORS PS1 EDITOR GIT_EDITOR
. ~/.git-completion.sh
@rlb3
rlb3 / .gnus.el
Last active August 30, 2015 09:54
.gnus.el
(load "starttls")
(load-library "smtpmail")
(setq user-mail-address "robert.l.boone@gmail.com")
(setq user-full-name "Robert Boone")
;; Configure incoming mail (IMAP)
(setq gnus-select-method '(nnimap "gmail"
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
@rlb3
rlb3 / .authinfo
Created June 3, 2009 09:57
authinfo
machine imap.gmail.com login email password pass port 993
machine smtp.gmail.com login email password pass port 587
(defun perltidy ()
(interactive)
(save-excursion
(mark-whole-buffer)
(shell-command-on-region (point) (mark) "perltidy -q" nil t)
(message "Tidied")))
(global-set-key "\C-c t" 'perltidy)
[mergetool.ediff]
cmd = emacs -q --eval \"(progn (defun ediff-write-merge-buffer () (let ((file ediff-merge-store-file)) (set-buffer ediff-buffer-C) (write-region (point-min) (point-max) file) (message \\\"Merge buffer saved in: %s\\\" file) (set-buffer-modified-p nil) (sit-for 1))) (setq ediff-quit-hook 'kill-emacs ediff-quit-merge-hook 'ediff-write-merge-buffer) (ediff-merge-files-with-ancestor \\\"$LOCAL\\\" \\\"$REMOTE\\\" \\\"$BASE\\\" nil \\\"$MERGED\\\"))\"
(ns com.rlb3.rps)
(defstruct object :type :verb)
(def rock (struct object :rock "breaks"))
(def paper (struct object :paper "covers"))
(def scissors (struct object :scissors "cuts"))
(def *objects* [rock paper scissors])
(def *object-map* (zipmap [:rock :paper :scissors] *objects*))
@rlb3
rlb3 / xml.el
Created January 12, 2011 23:16
(require 'xml)
(setq xml "<listaccts>
<acct>
<disklimit>unlimited</disklimit>
<diskused>0M</diskused>
<domain>tron.test</domain>
<email>tron@gmail.com</email>
<ip>127.0.0.1</ip>
<owner>tron</owner>
@rlb3
rlb3 / gcd.m
Created May 16, 2011 19:17 — forked from chrishulbert/gcd.m
Tricks with grand central dispatch
// Using grand central dispatch (GCD) so we don't block the GUI
dispatch_async(dispatch_get_global_queue(0, 0), ^{
// Background, long stuff runs here, but doesn't affect the GUI
dispatch_async(dispatch_get_main_queue(), ^{
// The GUI thread stuff goes here
[self.tableView reloadData]; // example
@rlb3
rlb3 / fogbugz.lisp
Created August 6, 2011 16:46
Common Lisp Fogbugz Library
(asdf:oos 'asdf:load-op :drakma)
(asdf:oos 'asdf:load-op :cl-libxml2)
(asdf:oos 'asdf:load-op :iterate)
(defpackage :fogbugz(:use :cl :iter :drakma :xtree :xpath))
(in-package :fogbugz)
(use-package :iterate)
(defclass Context ()
((user :initarg :user