Skip to content

Instantly share code, notes, and snippets.

View Dekker1's full-sized avatar

Jip J. Dekker Dekker1

View GitHub Profile
Dekker1 / gantt_example.mzn
Created July 11, 2022 00:27
Example of Gantt visualisations in the MiniZinc standard library
View gantt_example.mzn
include "output/gantt.mzn";
include "ide/vis.mzn";
set of int: Tasks = 1..10;
array[Tasks] of var 1..1440: start;
array[Tasks] of int: dur = [35 | i in Tasks];
constraint forall(i,j in Tasks where i > j) (if i mod 2 == 0 then start[i] + dur[i] < start[j] else start[i] + 16 < start[j] endif);
output [ show_gantt(start, dur) ];
constraint vis_gantt(start, dur);
Dekker1 / Dockerfile
Created May 13, 2022 00:26
MiniZinc Python Example Docker
View Dockerfile
FROM minizinc/minizinc:latest-alpine
RUN apk add --update --no-cache python3 py3-pip
RUN pip3 install --no-cache-dir minizinc
COPY /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/"]
Dekker1 / init.vim
Created October 25, 2016 09:45
Neovim configuration (Should I ever want to try again)
View init.vim
" => Dein.vim initialisation
if &compatible
set nocompatible
set runtimepath+=~/.config/nvim/repos/
call dein#begin(expand('~/.config/nvim/'))
Dekker1 / Timer.cpp
Last active October 21, 2015 15:25
A simple timer for C++ based programs
View Timer.cpp
// Created by Jip J. Dekker on 05/10/15.
#include "Timer.h"
void Timer::start() {
if (output) cout << "\t Start Application"<< endl;
app.start = high_resolution_clock::now();
Dekker1 / Makefile
Last active August 29, 2015 14:09
Gecode Makefile OSX
View Makefile
# A simple and basic Makefile build script for Gecode for Mac OSX.
# Author:
# Jip J. Dekker <>
# Based on similar makefile for linux by Georgios Petrousis <>
# Updated on: 9/11/2014
# Feel free to distribute this file to anyone.
# Please contact me for any corrections and suggestions.
Dekker1 /
Created May 5, 2014 22:00
Functions for F-shell. Drop an F-bomb, kill a process
function flip
echo "$argv[1]" | perl -C3 -Mutf8 -lpe '$_=reverse;y/a-zA-Z.['\'',({?!\"<_;‿⁅∴\r/ɐqɔpǝɟƃɥıɾʞ|ɯuodbɹsʇnʌʍxʎzɐqɔpǝɟƃɥıɾʞ|ɯuodbɹsʇnʌʍxʎz˙],'\'')}¿¡,>‾؛⁀⁆∵\n/'
function fuck
set -l CMD "pkill"
which $CMD >/dev/null; or set -l CMD "killall"
if [ $argv[1] = "off" ]
set FLIP ' (ノಠ益ಠ)ノ彡' '(ノಠ-ಠ)ノ彡'
Dekker1 / .zlogin
Last active August 29, 2015 13:58
.zlogin and for public key authentication on computer with encrypted home folder (will prompt for password if home folder not yet decrypted)
View .zlogin
if test -e $HOME/.ecryptfs/auto-mount; then
mount | grep "$HOME type ecryptfs"
if test $? != 0; then
cd $HOME
source ~/.zshrc