Skip to content

Instantly share code, notes, and snippets.

View Quintus's full-sized avatar

Marvin Gülker Quintus

View GitHub Profile
@Quintus
Quintus / jurgliederung.tex
Last active October 15, 2022 20:01
Juristische Gliederungsnummern mit LaTeX und KOMA-Script
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Zählerformatierung für griechische Buchstaben
% durch neudefiniertes Kommando \greek{<zähler>}.
% Informativ:
% - https://devtut.github.io/latex/counters-if-statements-and-loops-with-latex.html
% - https://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/
%
% \greek nutzt „echte“ griechische Buchstaben in UTF-8 und passt sich
% daher bestens in die umgebende Schriftformatierung ein; die im
% Internet kursierenden Beispiele nutzen den kursiven Mathematik-Font,
@Quintus
Quintus / xferlog.rb
Created July 30, 2018 17:05
Munin plugin for analysing xferlog (e.g. by vsftpd)
#!/usr/bin/ruby
LOGFILE = ENV["LOGFILE"] || "/var/log/vsftpd.log"
STATEFILE = ENV["STATEFILE"] || "#{ENV["MUNIN_PLUGSTATE"]}/munin-xferlog.state"
ROTLOGFILE = "#{LOGFILE}.1"
LOGFILE.freeze
STATEFILE.freeze
ROTLOGFILE.freeze
@Quintus
Quintus / go-allegro.go
Last active September 24, 2017 11:08
A working example of a simple use of the Allegro C library (liballeg.org) in Go
package main
/*
#cgo LDFLAGS: -lallegro
#include <stdio.h>
#include <stdlib.h>
#include <allegro5/allegro.h>
inline ALLEGRO_EVENT_TYPE extract_event(const ALLEGRO_EVENT* p_evt)
{
@Quintus
Quintus / console.log
Created December 10, 2016 21:44
mapnik node build failure
% npm install --build-from-source mapnik
/
> mapnik@3.5.14 preinstall /home/quintus/software/ff/node_modules/mapnik
> npm install node-pre-gyp
npm WARN package.json mapnik@3.5.14 No license field.
node-pre-gyp@0.6.32 node_modules/node-pre-gyp
├── semver@5.3.0
├── nopt@3.0.6 (abbrev@1.0.9)
├── mkdirp@0.5.1 (minimist@0.0.8)
@Quintus
Quintus / joystick.cpp
Created December 3, 2016 20:30
Super-simple test program for TSC joystick testing
/* Super-simple joystick testing program.
* Written by Marvin Gülker, on 2016-12-03.
* Compile with:
* $ g++ joystick.cpp -o joystick -lsfml-graphics -lsfml-window -lsfml-system
* Run as:
* ./joystick
*/
#include <iostream>
#include <SFML/Graphics.hpp>
@Quintus
Quintus / config.log
Last active August 3, 2016 18:32
Logfile for building ucl with MXE
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ucl configure 1.03, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --prefix=/home/quintus/tsc-mxe/usr/x86_64-unknown-linux-gnu --enable-static --disable-shared ac_cv_prog_HAVE_DOXYGEN=false --disable-doxygen
## --------- ##
## Platform. ##
@Quintus
Quintus / rand.c
Created June 1, 2016 20:56
PRNG demo for @sauer2
/* PRNG demonstration program.
* Compile with:
* $ gcc -Wall rand.c -o rand
* Run as:
* ./rand
*/
#include <stdio.h>
#include <stdlib.h>
@Quintus
Quintus / countrycodes.yml
Last active February 1, 2016 12:23
Machine-readable list of (most) ISO-3166-1 country codes in German / Maschinenlesbare Liste der (meisten) ISO-3166-1-Ländercodes auf Deutsch.
---
Afghanistan: af
Ägypten: eg
Åland: ax
Albanien: al
Algerien: dz
Amerikanisch-Samoa: as
Amerikanische Jungferninseln: vi
Andorra: ad
Angola: ao
@Quintus
Quintus / find-cmake-builddir.el
Created November 29, 2015 11:48
Finding the CMake build/ directory in Emacs Lisp (elisp) for compilation
; Add this function to your .emacs file and add it to the c-mode-common hook:
; (add-hook 'c-mode-common-hook 'find-cmake-builddir)
; Afterwards the `compile-command' variable will automatically contain a command for
; building your entire CMake project by just doing `M-x compile' whenever you
; open a C/C++ file inside a CMake-managed project. Sole requirement:
; You first have to manually create a directory "build/" next to your
; CMakeLists.txt file and run CMake with the appropriate options yourself.
(defun find-cmake-builddir ()
"Finds the build directory of a CMake project"
(let ((cmakefile nil) (dirname default-directory))
@Quintus
Quintus / prosodyconv.rb
Created October 24, 2015 14:50
Convert prosody 0.9.7’s filesystem data into the PIEFXIS format defined by XEP-0227
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
#
# prosodyconv.rb -- converts prosody rosters into PIEFXIS format as per XEP-0227.
#
# Copyright © 2015 Marvin Gülker
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions