Skip to content

Instantly share code, notes, and snippets.

Avatar

Jip J. Dekker Dekker1

View GitHub Profile
@Dekker1
Dekker1 / Dockerfile
Created May 13, 2022
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 basic_example.py /usr/local/bin/basic_example.py
ENTRYPOINT ["/usr/local/bin/basic_example.py"]
@Dekker1
Dekker1 / init.vim
Created Oct 25, 2016
Neovim configuration (Should I ever want to try again)
View init.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Dein.vim initialisation
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if &compatible
set nocompatible
endif
set runtimepath+=~/.config/nvim/repos/github.com/Shougo/dein.vim
call dein#begin(expand('~/.config/nvim/'))
@Dekker1
Dekker1 / Timer.cpp
Last active Oct 21, 2015
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
Dekker1 / Makefile
Last active Aug 29, 2015
Gecode Makefile OSX
View Makefile
# A simple and basic Makefile build script for Gecode for Mac OSX.
#
# Author:
# Jip J. Dekker <jip@dekker.li>
# Based on similar makefile for linux by Georgios Petrousis <gpetrousis@gmail.com>
#
# Updated on: 9/11/2014
#
# Feel free to distribute this file to anyone.
# Please contact me for any corrections and suggestions.
@Dekker1
Dekker1 / kill.fish
Created May 5, 2014
Functions for F-shell. Drop an F-bomb, kill a process
View kill.fish
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/'
end
function fuck
set -l CMD "pkill"
which $CMD >/dev/null; or set -l CMD "killall"
echo
if [ $argv[1] = "off" ]
set FLIP ' (ノಠ益ಠ)ノ彡' '(ノಠ-ಠ)ノ彡'
@Dekker1
Dekker1 / .zlogin
Last active Aug 29, 2015
.zlogin and config.fish 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
ecryptfs-mount-private
cd $HOME
source ~/.zshrc
fi
fi