Skip to content

Instantly share code, notes, and snippets.

View davidfokkema's full-sized avatar

David Fokkema davidfokkema

  • Vrije Universiteit Amsterdam
  • Amsterdam, The Netherlands
View GitHub Profile
@davidfokkema
davidfokkema / mklatex.sh
Created May 16, 2012 10:43
Latexmk build script
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Usage: mklatex.sh {latex-file}"
exit -1
fi
latexmk -e '$pdflatex=q/pdflatex %O -shell-escape %S/' -bibtex -pdf $1
@davidfokkema
davidfokkema / ipo.tex
Created May 21, 2012 13:03
Tikz IPO example
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[node distance=5cm, inner sep=10pt]
@davidfokkema
davidfokkema / code.js
Last active August 29, 2015 14:16
Visualisation of the detection of cosmic ray extensive air showers by the HiSPARC Science Park Array
var SPEEDUP_FACTOR = 2;
var station_info;
var map = L.map('map');
var svg = d3.select(map.getPanes().overlayPane).append("svg"),
g = svg.append("g").attr("class", "leaflet-zoom-hide");
function x(coord) { return map.latLngToLayerPoint(coord).x };
function y(coord) { return map.latLngToLayerPoint(coord).y };
@davidfokkema
davidfokkema / copy_libusb_dll.py
Created December 7, 2023 14:43
Copy libusb-1.0.dll from libusb-package to conda env root path
import json
import shutil
import subprocess
from pathlib import Path
output = subprocess.check_output("conda info --json", shell=True)
env_data = json.loads(output)
env_path = Path(env_data["active_prefix"])
dll_path = env_path / "Lib" / "site-packages" / "libusb_package" / "libusb-1.0.dll"