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
(defmethod diagonal ((box <body>)) | |
(let ((vertices (vertices-of box)) | |
(max-point (make-float-vector 3)) | |
(min-point (make-float-vector 3)) | |
) | |
(copy-vector (car vertices) max-point) | |
(copy-vector (car vertices) min-point) | |
(dolist (v (cdr vertices)) | |
(dotimes (i 3) | |
(when (> (aref v i) (aref max-point i)) |
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
(require :komainu) | |
(use-package :nurarihyon) | |
(use-package :nurikabe) | |
(use-package :chimi) | |
(use-package :komainu) | |
(defclass* <pgrl> | |
() | |
((environment nil) | |
(n 0) |
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
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerName example.xom | |
DocumentRoot /var/www/html | |
</VirtualHost> | |
<VirtualHost *:80> | |
ServerName hunchentoot.example.com | |
ProxyPass / http://127.0.0.1:4242/ |
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
(defmacro with-layout ((&key (header *header-html*) | |
(side *side-html*) | |
(footer *footer-html*) | |
(title "title here") | |
(css "/css/main.css") | |
) | |
&body body) | |
`(cl-who:with-html-output-to-string (*standard-output* nil :prologue nil :indent t) | |
(:html | |
(:head (:title ,title) |
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
(defmacro sexp-file->html (fname) | |
(let ((sexp (with-open-file (f fname) (read f)))) | |
`(cl-who:with-html-output-to-string (*standard-output*) ,sexp) | |
) | |
) | |
;; -- foo.sexp -- | |
;; (:p | |
;; (:ul | |
;; (:li "foo") |
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
(defmacro try-catch ((&body try) &rest errors) | |
`(handler-case () (progn ,@try) ,@errors)) | |
;; (try-catch ( | |
;; (foo) | |
;; (bar) | |
;; ) | |
;; (simple-error (c) (warn "simple-error! ~a" c)) | |
;; (error (c) (warn "error! ~a" c)) | |
;; ) |
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
(defmacro config-value-bind ((fname &rest symbols) &body body) | |
(let ((s (gensym "s")) | |
(f (gensym "f")) | |
) | |
`(with-open-file (,f ,fname) | |
(let* ((,s (read ,f)) | |
,@(mapcar #'(lambda (x) `(,x (cdr (assoc ',x ,s)))) symbols) | |
) | |
,@body | |
) |
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
++++++++[>+++++++++<-]>.<+++++[>++++++<-]>-.<++[>+++<-]>+..+++.<++++++[>----<-]>.<++++++[>++++<-]>.+++.------.--------. |
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
\newcommand{\subsubsubsection}{\@startsection{paragraph}{4}{\z@}% | |
{1.5\Cvs \@plus.5\Cdp \@minus.2\Cdp}% | |
{.5\Cvs \@plus.3\Cdp}% | |
{\reset@font\normalsize\sffamily} | |
} |
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
(defn add-classpath-dir | |
[dir] | |
(let [files (.listFiles (java.io.File. dir))] | |
(doseq [f (filter (fn [f] (and (.isFile f) | |
(.endsWith (.getName f) ".jar"))) files)] | |
(add-classpath (.toURL (.toURI f))) | |
) | |
) | |
) |
OlderNewer