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
(setq package-archives | |
'(("original" . "http://tromey.com/elpa/") | |
("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "http://marmalade-repo.org/packages/"))) | |
(package-initialize) |
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 linear-pa | |
N -> (snd (reduce | |
(/. X Y | |
(let Pnt (pick (fst Y)) | |
(@p [Pnt X|(fst Y)] (@p [X|(fst (snd Y))] [[X Pnt]|(snd (snd Y))])))) | |
(@p [0] (@p [0] [])) (range 1 (- N 1))))) |
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
(EXT:SAVEINITMEM "shen-w-libs" | |
:INIT-FUNCTION #'shen-shen | |
:NORC T | |
:SCRIPT T | |
:EXECUTABLE T | |
:QUIET T) |
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
echo "(defvar tweets '(" > /tmp/tweet.lisp | |
cat tweet.TREC|sed 's/<TREC>//g; s/<\/TREC>/))/g; s/<DOC>//g; s/<\/DOC>//g; s/<DOCNO>/(:/g; s/<\/DOCNO>//g; s/\\/\\\\/g; s/"/\\"/g; s/<body>/"/g; s/<\/body>/")/g'>>/tmp/tweet.lisp | |
# then from CL | |
# (load "/tmp/tweet.lisp") | |
# (length tweets) ;; => 113201 |
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
(add-to-list 'org-export-latex-classes | |
'("twocolumn" "\\documentclass[10pt, twocolumn]{article}" | |
("\\section{%s}" . "\\section*{%s}") | |
("\\subsection{%s}" . "\\subsection*{%s}") | |
("\\subsubsection{%s}" . "\\subsubsection*{%s}") | |
("\\paragraph{%s}" . "\\paragraph*{%s}") | |
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) |
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
myKeys conf@(XConfig {XMonad.modMask = modm}) = | |
[ ((modm, xK_b), sendMessage ToggleStruts) -- Mod-b: toggle xmobar panel | |
, ((modm, xK_p), spawn "dmenu_run") -- needs explicit for completion | |
-- , ("<XF86AudioNext>", spawn "cmus-remote -n") | |
, ((0, xF86XK_AudioNext), spawn "cmus-remote -n") | |
, ((0, xF86XK_AudioPrev), spawn "cmus-remote -r") | |
, ((0, xF86XK_AudioPlay), spawn "cmus-remote -u") | |
, ((0, xF86XK_AudioStop), spawn "cmus-remote -s") | |
, ((0, xF86XK_AudioLowerVolume), spawn "amixer set Master 5%-") | |
, ((0, xF86XK_AudioRaiseVolume), spawn "amixer set Master 5%+") |
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
(defun (setf it) (new tree) (setf tree new)) | |
(let ((this :foo)) | |
(setf (it this) :bar) | |
this) ;; => :foo (why does this return :foo and not :bar) |
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
servers = (... | |
{ | |
address = "irc.freenode.net"; | |
chatnet = "freenode"; | |
port = "6667"; | |
use_ssl = "no"; | |
ssl_verify = "no"; | |
autoconnect = "no"; | |
}, | |
...); |
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
# | |
# Prints a window activity line to a file with color markup for consumption by xmobar | |
# | |
# Based on activity_file and nicklist | |
# | |
# | |
# The script uses 3 variables: | |
# act_file_width: How many characters wide the act list can be | |
# act_file_path: Path to the file | |
# act_file_hilight: How to hilight the "ACT" in the beginning: |
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
(font-lock-add-keywords | |
'lisp-mode | |
'(("\\<\\(bind\\)\\>" . font-lock-keyword-face) | |
("\\<\\(lambda-bind\\)\\>" . font-lock-keyword-face) | |
("\\<\\(lambda-registers\\)\\>" . font-lock-keyword-face) | |
("\\<\\(when-let\\)\\>" . font-lock-keyword-face) | |
("\\<\\(if-let\\)\\>" . font-lock-keyword-face) | |
;; fancy character for smaller lambda-bind | |
("(?\\(lambda-bind\\>\\)" | |
(0 (progn (compose-region (match-beginning 1) (match-end 1) ?\β) nil))) |