Skip to content

Instantly share code, notes, and snippets.

@thorrr
thorrr / Makefile
Last active January 2, 2016 15:09
Makefile for building quantlib + python extensions.
.PHONY: all downloads clean clean_downloads
### URLS ########
boost_url := 'http://downloads.sourceforge.net/project/boost/boost/1.53.0/boost_1_53_0.tar.bz2'
quantlib_url := 'http://sourceforge.net/projects/quantlib/files/QuantLib/1.2.1/QuantLib-1.2.1.tar.gz'
quantlib_swig_url := 'http://sourceforge.net/projects/quantlib/files/QuantLib/1.2/other%20languages/QuantLib-SWIG-1.2.tar.gz'
#################
#### subdirectory names #####
ql_swig_install_dir := quantlib-swig-install
boost_dir := boost_1_53_0
@thorrr
thorrr / Makefile
Last active January 2, 2016 15:09
Makefile for building cling from source. Works on win32 cygwin, need to modify the exename variable to make it work on Linux
cling-version := 45925
install-dir := $(shell pwd)/cling
exename := $(install-dir)/bin/cling.exe
.PHONY: all clean exe clang cling repl crepl cpprepl
all: exe
clean:
rm ./lastKnownGood
@thorrr
thorrr / check-and-restart-net.sh
Last active August 29, 2015 14:04
Run this in a one minute cron job to check network connectivity every 20 seconds
#!/bin/bash
LOCKFILE=/tmp/check-and-restart.lock
if ! mkdir "${LOCKFILE}" 2>/dev/null; then
echo "check-and-restart is already running." >&2
exit 1
fi
trap "rm -rf ${LOCKFILE}; exit" INT TERM EXIT