Skip to content

Instantly share code, notes, and snippets.

View martialboniou's full-sized avatar

Martial martialboniou

  • Brittany
View GitHub Profile
@martialboniou
martialboniou / *scratch*
Created November 11, 2011 15:35 — forked from remvee/*scratch*
bind f1, f2, f3 and f4 in emacs term
(defun term-send-function-key ()
(interactive)
(let* ((char last-input-event)
(output (cdr (assoc char term-function-key-alist))))
(term-send-raw-string output)))
(defconst term-function-key-alist '((f1 . "\e[OP")
(f2 . "\e[OQ")
(f3 . "\e[OR")
(f4 . "\e[OS")))
@martialboniou
martialboniou / gist:1392156
Created November 24, 2011 19:54
Chit for ruby 1.9.2+
# Install chit on ruby 1.9.2+
git clone https://github.com/libin/chit.git
cd chit
gem build chit.gemspec
gem install chit-1.0.1.1.gem
@martialboniou
martialboniou / gist:1485836
Created December 16, 2011 12:18
sbcl easy install
#!/bin/zsh
BINDIR="${HOME}/.tools/bin"
QUICKLISPDIRNAME=".quicklisp"
WORKINGLISPDIR="${HOME}/Dynamics/sbcl"
EMACS_CL=emacs
() {
[[ -a "${HOME}/.emacs.d/data/.launched" ]]\
&& which emacs-cl > /dev/null 2>&1\
&& EMACS_CL=emacs-cl
}
@martialboniou
martialboniou / build-essential.sh
Created December 20, 2011 13:55 — forked from henry0312/build-essential.sh
Build m4, autoconf, automake, libtool on Mac OS X Lion
#!/bin/sh
# 初期設定
WORK=$HOME/Builds/build-essential
PREFIX=$HOME/local
export PATH="$PREFIX/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
# ソースコードのダウンロード
if [ ! -d $WORK/src ] ; then
mkdir src
@martialboniou
martialboniou / weblocks-first-step
Created January 3, 2012 16:13
weblocks hello world on sbcl and clbuild
;; go to your favorite web site directory in order to create a simple-blog bundle and start sbcl
;; NOTE: you may start sbcl via: 'clbuild lisp'
(use-package :ql-dist)
(available-versions (dist "quicklisp"))
(install-dist "http://beta.quicklisp.org/dist/quicklisp/2011-11-07/distinfo.txt" :replace t)
(ql:quickload "cl-precedence")
(ql:quickload "weblocks")
(require :weblocks-scripts)
(weblocks-scripts:make-application 'simple-blog (truename "."))
(push (make-pathname :directory '(:relative "simple-blog"))
@martialboniou
martialboniou / canonical_readlink
Created January 11, 2012 13:44
bourne shell canonical readlink
@martialboniou
martialboniou / shunit_subst.zsh
Created January 11, 2012 21:57
zsh substitution - example of shell unit test with shunit2
#!/usr/bin/env zsh
which shunit2 &> /dev/null || ( echo "install shunit2" && exit )
setopt shwordsplit
testSubstituteRL(){
local file=/etc/passwd.txt
assertEquals "substitute root" "/etc/passwd" ${file:r}
assertEquals "substitute tail" "passwd.txt" ${file:t}
}
@martialboniou
martialboniou / upgrade_forked_brew.sh
Created January 12, 2012 15:40
homebrew mxcl master sync script for github fork in default remote AKA origin
#!/usr/bin/env zsh
# Sync mxcl homebrew with a forked version
#
# Usage: upgrade_forked_brew.sh && git push origin
emulate -L zsh
local FORK_GITHUB_USER=martialboniou
@martialboniou
martialboniou / force_quicklisp_asdf2_sbcl
Created January 16, 2012 17:08
asdf sbcl quirk fixing with quicklisp
;;; SNIPPET FOR QUICKLISP
;; If you get error when evaluating (asdf::source-registry) in the SBCL REPL
;; you can replace the line '(ensure-asdf-loaded)' in quicklisp/setup.lisp by:
#-asdf
(load (qmerge "asdf.lisp"))
;;; SNIPPET FOR CLBUILD2
@martialboniou
martialboniou / .stumpwmrc
Created January 23, 2012 19:30 — forked from shes-a-skeeze/.stumpwmrc
stumpwm
;; MY STUMPWM
(in-package :stumpwm)
(setq *mouse-focus-policy* :click)
(setf *startup-message*
"everything seems to be just fine")
(set-contrib-dir "/home/sleeze/.config/stumpwm/contrib")
(setf *suppress-frame-indicator* t)
;; Directories