Skip to content

Instantly share code, notes, and snippets.

@spchamp
spchamp / rlwrap_sbcl.md
Last active January 4, 2021 22:58
Create an rlwrap wrapper for SBCL

Create an rlwrap wrapper for SBCL

Create the file /usr/local/bin/rlsbcl with such as the following contents

#!/bin/sh
CMD="${SBCL_HOME:-/usr/bin}/sbcl"
exec rlwrap -q '"' -m -O '^\*\>' "${CMD}" "$@"
@spchamp
spchamp / gist:053a293e07a90d1bddafa61b7b1f5d40
Last active July 30, 2016 19:08
Factor ax^2 + bx + c in Common Lisp
;; Author: Sean Champ, 30 July 2016
;; License: Public Domain (#YMMV)
(defun grouping-m-n (a b c)
(let ((radic (sqrt (- (expt b 2) (* 4 a c))))
(nb (- b)))
(values (/ (+ nb radic) -2)
(/ (- nb radic) -2))))
# .bash_logout -*- sh -*-
if [ -n "$SSH_AGENT_PID" ] &&
[ "$(ps -p $SSH_AGENT_PID -c -o comm | sed 1d)" = ssh-agent ] &&
[ "$(ps -U $USER -c -o tty | sed 1d | grep -v "^-" | sort | uniq)" -eq 1];
## Do not enter this branch of control flow
## if user is logged in under another PTY/TTY
then eval $(ssh-agent -k)
fi
@spchamp
spchamp / gist:54341be9bc292938fee982b040010fc4
Created May 25, 2016 03:19
otlib user support bibliography r1
Abawajy, Jemal H., ed. Internet and Distributed Computing Advancements: Theoretical Frameworks and Practical Applications. Premier Reference Source. Hershey, Pa: Information Science Reference, 2012. https://www.safaribooksonline.com/library/view/internet-and-distributed/9781466601611/.
Acar, E, and S Satchell. Advanced Trading Rules. Oxford: Butterworth-Heinemann, 2002. https://www.safaribooksonline.com/library/view/advanced-trading-rules/9780750655163/.
Alencar, Marcelo S. Information Theory. New York: Momentum Press, 2015. https://www.safaribooksonline.com/library/view/information-theory/9781606505281/.
Anton, Howard. Elementary Linear Algebra. 11th edition. Hoboken, NJ: Wiley, 2013. https://www.safaribooksonline.com/library/view/elementary-linear-algebra/9781118434413/.
Antonopoulos, Andreas M. Mastering Bitcoin. First edition. Sebastopol CA: O’Reilly, 2015. https://www.safaribooksonline.com/library/view/mastering-bitcoin/9781491902639/.
Arnold, Glen. The Financial Times Guide to Banking, 2014. https://www
Verifying that +spchamp is my blockchain ID. https://onename.com/spchamp
@spchamp
spchamp / gist:507ad17f3ce264b2f8378eebe7b8510f
Created April 29, 2016 22:58
Apt sources.list for Ubuntu deb-src repositories
## via https://repogen.simplylinux.ch/generate.php
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#
###### Ubuntu Main Repos
deb-src http://01.archive.ubuntu.com/ubuntu/ wily main restricted universe multiverse
Verifying that +spchamp is my blockchain ID. https://onename.com/spchamp