Skip to content

Instantly share code, notes, and snippets.

View svenwltr's full-sized avatar

Sven Walter svenwltr

  • reBuy reCommerce GmbH
  • Berlin, Germany
View GitHub Profile
@svenwltr
svenwltr / docker-httpd-static
Created June 12, 2014 09:02
A transient HTTPD with docker.
#!/bin/bash
VOLUME=$( readlink -f $1 )
CID_FILE=$( mktemp -u )
docker run --cidfile="${CID_FILE}" --rm=true -v "${VOLUME}:/usr/local/nginx/html:ro" nginx &
while [ ! -f $CID_FILE ] ;
do
@svenwltr
svenwltr / Makefile
Last active August 29, 2015 14:08
ATmega 8 - PWM test
BUILDDIR=build
BASENAME=pwm_test
MMCU=atmega8
all: clean compile burn
clean:
rm -f $(BUILDDIR)/$(BASENAME).elf
rm -f $(BUILDDIR)/$(BASENAME).hex
@svenwltr
svenwltr / curry.js
Last active August 29, 2015 14:19
Currying method with holes for JavaScript.
'use strict';
/*
* Currying method.
*
* Usage:
* >>> function test(a, b, c) {console.log(a, b, c); }
* >>> c = curry(test, '->', curry.hole, '<-');
* >>> c('Hello');
* <<< -> Hello World <-
@svenwltr
svenwltr / Makefile
Last active February 6, 2017 18:13
LaTeX draft corner
MASTER=document.tex
DESCRIBE=$(shell git describe --tags --dirty)
SOURCE="\def\MyGitRevision{$(DESCRIBE)}\input{$(MASTER)}"
full:
make pdf
make pdf
pdf:
pdflatex "\def\MyGitRevision{$(DESCRIBE)}\input{$(MASTER)}"
@svenwltr
svenwltr / README.md
Last active November 28, 2020 09:44
Space Engineers Convert Blueprint XML