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
(in-package :cl-user) | |
(ql:quickload '(:ironclad :asn1)) | |
(defun generate-rsa-key-pair (num-bits) | |
"Same as (ironclad:generate-key-pair :rsa :num-bits num-bits) except returning in DER format." | |
(check-type num-bits integer) | |
(let ((l (floor num-bits 2))) | |
(multiple-value-bind (p q n) | |
(loop for a = (ironclad:generate-prime (- num-bits l)) |
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
(annot:defannotation fntype (args result form) | |
(:arity 3) | |
(let* ((last-form (cl-annot.util:progn-form-last form)) | |
(symbol (cl-annot.util:definition-form-symbol last-form))) | |
`(progn (declaim (ftype (function ,args ,result) ,symbol)) | |
,form))) | |
;; Usage: | |
;; (ql:quickload :cl-syntax) | |
;; (syntax:use-syntax :annot) |
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
(defpackage #:lock-pool | |
(:use #:cl) | |
(:import-from #:bordeaux-threads) | |
(:import-from #:alexandria | |
#:once-only) | |
(:export #:lock-pool | |
#:make-lock-pool | |
#:acquire-lock-in-pool | |
#:release-lock-in-pool | |
#:with-lock-pool-held)) |
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
#|-*- mode:lisp -*-|# | |
#| | |
exec ros -Q -- $0 "$@" | |
|# | |
#| | |
Generate a Hubot script (.js file) from the given Roswell script. | |
Usage: | |
$ hubotify <roswell script> |
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
FROM ubuntu | |
MAINTAINER Eitaro Fukamachi <e.arrows@gmail.com> | |
LABEL Description="Ubuntu with Roswell, Common Lisp implementation manager" | |
RUN apt-get update && apt-get install -y autotools-dev automake libcurl4-gnutls-dev curl make | |
RUN curl -SL https://github.com/snmsts/roswell/archive/release.tar.gz \ | |
| tar -xzC /tmp/ \ | |
&& cd /tmp/roswell-release \ | |
&& sh bootstrap \ |
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
(ql:quickload '(:cl+ssl :fast-io)) | |
(in-package #:cl-user) | |
(defpackage #:pkcs12-experiment | |
(:use #:cl) | |
(:import-from #:cffi) | |
(:import-from #:cl+ssl)) | |
(in-package #:pkcs12-experiment) | |
(cffi:defcfun ("EVP_PKEY_new" evp-pkey-new) :pointer) |
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
#+sbcl | |
(defun start (commands) | |
(check-type commands cons) | |
(multiple-value-bind (inputfd-shell outputfd-shell) | |
#+win32 (sb-win32::make-named-pipe) #-win32 (sb-posix:pipe) | |
(multiple-value-bind (inputfd-cl outputfd-cl) | |
#+win32 (sb-win32::make-named-pipe) #-win32 (sb-posix:pipe) | |
#+win32 | |
(setf (sb-win32::inheritable-handle-p inputfd-cl) t | |
(sb-win32::inheritable-handle-p outputfd-cl) 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
#!/bin/sh | |
#|-*- mode:lisp -*-|# | |
#| Experimentation for loading CL+SSL on Windows with a custom ssleay32.dll | |
exec ros -Q -- $0 "$@" | |
|# | |
#| | |
NOTE: Put ssleay32.dll at the same directory as this script. | |
|# |
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
;; http://www.jasq.org/2/post/2012/05/inverse-fizzbuzz.html | |
;; http://d.hatena.ne.jp/matarillo/20120515/p1 | |
#.(progn | |
(ql:quickload :optima) | |
(ql:quickload :alexandria) | |
(ql:quickload :cl-test-more) | |
(values)) | |
(setq *print-circle* 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
(defun which (command) | |
(handler-case | |
(let* ((result (with-output-to-string (s) | |
(uiop:run-program `("which" ,command) | |
:output s | |
:error-output *error-output*))) | |
(newline-pos | |
(position-if (lambda (char) | |
(or (char= char #\Newline) | |
(char= char #\Return))) |