This file contains hidden or 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
(ql:quickload '(:drakma :closure-html :cxml :stp-query)) | |
(defun get-before-and-after-pictures (page-number) | |
"Fetches relative urls for before and after pictures from a thread on Mark's Daily Apple." | |
(mapcar (alexandria:rcurry #'$:attr "src") | |
($:query "blockquote.postcontent > img" | |
(chtml:parse | |
(drakma:http-request (format nil "http://www.marksdailyapple.com/forum/thread6138-~D.html" page-number)) | |
(cxml-stp:make-builder))))) |
This file contains hidden or 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 read-n-characters (n &optional (stream *standard-input*)) | |
(let ((seq (make-string n))) | |
(read-sequence seq stream) | |
seq)) |
This file contains hidden or 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
(eval-when (:compile-toplevel :load-toplevel) | |
(ql:quickload :restas)) | |
(restas:define-module :my-site | |
(:use :cl)) | |
(in-package :my-site) | |
(restas:define-route hello ("/hello") | |
"Hello!") |
This file contains hidden or 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
(defpackage :printing-from-hunchentoot | |
(:use :cl)) | |
(in-package :printing-from-hunchentoot) | |
(defparameter *my-acceptor* (make-instance 'hunchentoot:acceptor :port 8080)) | |
(defparameter *out* *standard-output*) | |
(hunchentoot:start *my-acceptor*) |
This file contains hidden or 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
(loop :for n :from 1 :below 1000 | |
:when (or (zerop (mod n 3)) | |
(zerop (mod n 5))) | |
:sum n) |
This file contains hidden or 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
(some-function :foo | |
:bar) |
This file contains hidden or 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
(some-function (:foo) | |
:bar) |
This file contains hidden or 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
(cl-sendmail:with-email (html "[email protected]" :from "[email protected]" :subtype "html") | |
(setf (cl-sendmail::content html) | |
(xmls:parse "<body><h1>Testing</h1><p>This is a test!</p></body>"))) |
This file contains hidden or 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 packages-created-by (&rest forms) | |
(with-gensyms (packages-before) | |
`(let ((,packages-before (list-all-packages))) | |
,@forms | |
(set-difference (list-all-packages) ,packages-before)))) |
This file contains hidden or 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
(("stassats" . 40572) ("Xach" . 38278) ("nyef" . 37542) ("pjb" . 36812) | |
("sykopomp" . 27405) ("p_l" . 27385) ("beach" . 25487) ("pkhuong" . 24938) | |
("tcr" . 22036) ("drewc" . 19171) ("stassats`" . 17795) ("Zhivago" . 17075) | |
("_3b" . 16209) ("fusss" . 15704) ("Fare" . 15631) ("madnificent" . 15121) | |
("H4ns" . 14446) ("antifuchs" . 14346) ("gigamonkey" . 13040) | |
("Ralith" . 12161) ("fe[nl]ix" . 11921) ("Guthur" . 11524) ("Fade" . 11351) | |
("Adlai" . 11318) ("nikodemus" . 10038) ("rsynnott" . 10017) ("rahul" . 9910) | |
("schme" . 8600) ("mathrick" . 8582) ("Krystof" . 8452) ("hefner" . 8430) | |
("tic" . 8072) ("weirdo" . 7948) ("Phoodus" . 7711) ("jdz" . 7256) | |
("dlowe" . 7219) ("francogrex" . 7132) ("drdo" . 6495) ("adeht" . 6304) |