Skip to content

Instantly share code, notes, and snippets.

kdungs / .vimrc
Last active Jul 31, 2019
<50 line minimal Vim configuration.
View .vimrc
" .vimrc
" Kevin Dungs <>
" 2016-07-16
filetype plugin on
set enc=utf-8
" Defaults
kdungs / expr.h
Last active May 15, 2016
A minimalistic solution for the Expression Problem as presented by Eli Bendersky in [his blog](
View expr.h
#pragma once
#include <string>
#include <utility>
struct Constant {
double value;
double eval(const Constant& c) { return c.value; }
kdungs /
Last active Feb 21, 2016
Define a Check monad and corresponding functions in Python. Now also a repo:
""" Define a Check monad and corresponding functions.
from functools import partial
class Check:
""" This super class is not really necessary but helps make the structure
data Check a = Pass a | Fail Message
#include <iostream>
#include <boost/serialization/strong_typedef.hpp>
BOOST_STRONG_TYPEDEF(double, Distance)
BOOST_STRONG_TYPEDEF(double, Velocity)
Velocity calculateVelocity(Distance d, Time t) {
return Velocity{static_cast<double>(d) / static_cast<double>(t)};
View agumon.go
package main
import (
zmq ""
kdungs / Makefile
Created May 4, 2015
Code for blog post.
View Makefile
CXXFLAGS=-O3 -Werror -Weverything -pedantic -Wno-c++98-compat -std=c++14
all: test_mult
rm -f test_mult
kdungs /
Last active Aug 29, 2015
Code for my blog post on Higher Order Functions in C++.
#include <cassert>
#include <functional>
// Classical Function Definition
int add(int x, int y) {
return x + y;
kdungs /
Created Nov 28, 2014
Extract streamer information for LHCb HLT1 Muon Streamers from TCK. The resulting JSON is put into via the `--config` option.
#!/usr/bin/env python
import json
import TCKUtils.utils as ut
TCK = 0x6A1710
streamers = [
kdungs / Makefile
Created Jun 22, 2014
A Makefile for LaTeX with intermediate running of biber.
View Makefile
build/${PROJECT}.pdf: build/${PROJECT}.bbl
lualatex --output-directory=build ${PROJECT}
build/${PROJECT}.bbl: build/${PROJECT}.bcf
biber build/${PROJECT}
build/${PROJECT}.bcf: ${PROJECT}.tex
lualatex --output-directory=build ${PROJECT}
View kalman_Makefile
CXXFLAGS=-std=c++11 -stdlib=libc++
CXXFLAGS+=$(shell pkg-config --cflags eigen3)
all: kalman kalman_eigen
rm -f kalman
rm -f kalman_eigen