Skip to content

Instantly share code, notes, and snippets.

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
@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
# .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: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))))
@spchamp
spchamp / man2pdf.sh
Created October 30, 2016 23:49
PDF generator for manual pages in *ROFF format. runtime-depends on ports textproc/groff and print/ghostscript9-base. Public domain. No warranty.
#!/bin/sh
THIS="$(basename $(readlink -f $0))"
msg() {
echo "$THIS: $@"
}
ferr() {
@spchamp
spchamp / docbook2X.buildlink3.mk
Created November 8, 2018 23:14
mk/docbook2x.buildlink3.mk - provides ports e.g textproc/expat with build configuration for docbook2X or xmlto
# $NetBSD$
#
# This Makefile fragment is meant to be included by ports that require
# a docbook2X implementation during build
#
# === Variables set by this file ===
#
# DOCBOOK2X_TYPE
# The name of the selected docbook2X implementation.
# One of: docbook2X, docbook2x, xmlto
@spchamp
spchamp / Ninja.tools.mk
Created September 29, 2019 08:25
Snippet - use ninja-build in pkgsrc www/webkit-gtk
BUILD_DEPENDS+= ninja-build-[0-9]*:../../devel/ninja-build
CMAKE_ARGS+= -GNinja
do-build:
cd ${WRKSRC} && ninja
@spchamp
spchamp / gist:4914ed654dffeff17e2e2fa431f95557
Created October 1, 2019 23:24
Build failures with newer WebKit (GTK+)
When building `webkit-gtk-2.26.1` with a GTK+3 `gtk+-3.24.10`, after some update to the webkit-gtk port, e.g
~~~~
-USE_LANGUAGES= c c++11
+USE_LANGUAGES= c c++11 c++14 c++17
~~~~
... this apparently serving to obviate some build failures, but subsequently, the following build failures may occur
~~~~