This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
#| Hey Emacs, this is -*-scheme-*- code! | |
#$Id: v4-script-template.ss 5887 2008-12-30 18:12:50Z erich $ | |
exec mzscheme -l errortrace --require "$0" --main -- ${1+"$@"} | |
|# | |
#lang scheme | |
(require "trie.ss" | |
(planet schematics/schemeunit:3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
commit=$1 | |
git diff --name-only $commit..${commit}^ > files | |
git cat-file commit $commit | egrep '^tree ' | awk '{print $2}' | xargs git ls-tree --full-tree -r > tree | |
join -1 1 -2 4 files tree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git add $(git rev-parse --git-dir)/../dump.sql | |
git commit "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# XXX says that it's bad to form the habit of using | |
# killall, since on Solaris it ... er ... kills all the processes on | |
# the system. Better to use pkill. | |
if [ -n "$(type -p killall)" ]; then | |
killall () | |
{ | |
echo "Use \`pkill' instead." | |
} | |
pkill () | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nick channels in common with offby1 | |
---------------------------------- | |
fsbot 3 (##cinema #emacs #erc) | |
a-s 3 (##cinema #emacs #scheme) | |
brx 3 (##cinema #emacs #scheme) | |
Sketch 3 (##cinema #emacs #erc) | |
tarbo_ 3 (#emacs #git #scheme) | |
Guest59650 3 (#emacs #git #scheme) | |
Leonidas 3 (#emacs #git #scheme) | |
r0bby 3 (#emacs #git #scheme) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(mapcar (lambda (hooksym) | |
(add-hook hooksym | |
(lambda () | |
(local-set-key (kbd "C-m") 'newline-and-indent)))) | |
'( | |
emacs-lisp-mode-hook | |
erlang-mode-hook | |
java-mode-hook | |
lisp-interaction-mode-hook | |
lisp-mode-hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So I've got commits that look like this: | |
A---B1--B2--B3--B4--B5--C1--C2--C3--C4--C5 ... | |
And I want them to look like this: | |
C'1--C'2--C'3--C'4 | |
/ | |
A---B'1--B'2--B'3--B'4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
#| Hey Emacs, this is -*-scheme-*- code! | |
#$Id: v4-script-template.ss 6086 2009-06-14 20:14:28Z erich $ | |
exec mzscheme -l errortrace --require "$0" --main -- ${1+"$@"} | |
|# | |
#lang scheme | |
(require schemeunit schemeunit/text-ui) | |
(define (all-the-same seq) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (uniq seq) | |
(cond | |
((null? seq) | |
seq) | |
((null? (cdr seq)) | |
seq) | |
((equal? (car seq) | |
(cadr seq)) | |
(uniq (cdr seq))) | |
(else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (uniq seq) | |
(for/fold ([result '()]) | |
([item seq]) | |
(cond | |
((null? result) | |
(cons item result)) | |
((equal? item (car result)) | |
result) | |
(else | |
(cons item result))))) |