Skip to content

Instantly share code, notes, and snippets.

@pafmaf
pafmaf / layout.data
Created July 23, 2016 21:30
BV example contents
(6.346, 6.368, 6.371, 6.371, 6.318, 6.317, 6.317, 6.317, 6.306, 6.278, 5.273, 5.273, 5.259, 5.253, 5.253, 5.253, 5.247, 5.233, 5.076, 5.076, 5.062, 5.056, 5.056, 5.056, 5.056, 5.051, 5.037, 1.613, 1.613, 1.599, 1.594, 1.594, 1.594, 1.588, 1.574, 1.417, 1.417, 1.403, 1.397, 1.397, 1.397, 1.397, 1.391, 1.377, 1.234, 1.234, 1.22, 1.215, 1.215, 1.215, 1.199, 1.161, 1.124, 1.108, 1.108, 1.108, 1.108, 1.103, 1.089, 0.299, 0.299, 0.271, 0.259, 0.259, 0.259, 0.217, 0.181, 0.181, 0.182, 0.203, 0.241, 0.241, 0.27, 0.27, 0.242, 0.201, 0.196, 0.16, 0.16, 0.13, 0.108, 0.108, -0.079, -0.181, -0.181, -0.216, -0.224, -0.224, -0.224, -0.245, -0.303, -0.382, -0.421, -0.421, -0.449, -0.46, -0.46, -0.46, -0.449, -0.421, 0.068, 0.068, 0.096, 0.107, 0.107, 0.107, 0.113, 0.127, 1.278, 1.278, 1.305, 1.317, 1.317, 1.317, 1.326, 1.326, 1.348, 1.348, 1.356, 1.356, 1.356, 1.356, 1.362, 1.376, 4.187, 4.187, 4.201, 4.207, 4.207, 4.207, 4.215, 4.215, 4.237, 4.237, 4.246, 4.246, 4.246, 4.246, 4.252, 4.266, 4.289, 4.289, 4.303, 4.309, 4.309,
@pafmaf
pafmaf / Toolchain-mingw32.cmake
Created July 1, 2016 13:07
MinGW win toolchain example
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)
SET(MINGW_BASE C:/msys64/mingw64)
SET(MINGW_AR ${MINGW_BASE}/bin/ar.exe)
# which compilers to use for C and C++
SET(CMAKE_MAKE_PROGRAM ${MINGW_BASE}/bin/mingw32-make.exe)
SET(CMAKE_C_COMPILER ${MINGW_BASE}/bin/gcc.exe)
@pafmaf
pafmaf / defz.cpp
Created June 27, 2016 16:13
Decoding .fz board files.
// Decoding an .fz file. You still need the key of course.
// https://en.wikipedia.org/wiki/RC6 here you can read it all up.
// Looking at the paper the algo is straight forward, not sure about endianness.
// This will put out some .bin file you would decompress using zlib.
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@pafmaf
pafmaf / googleforms2slack.gs
Created November 22, 2015 13:27 — forked from andychase/googleforms2slack.gs
Google Forms Slack Notification
// Google Forms Slack Notification
// Andy Chase <github.com/andychase>
// License: CC0 1.0 Universal <creativecommons.org/publicdomain/zero/1.0>
// Install 1: This code goes in ( tools > script editor... ) of your google docs form
// Install 2: ( resources > current project triggers ) ( [onSubmit], [from Form], [On form submit] )
// Setup 1: Put your slack api url below
var POST_URL = "https://hooks.slack.com/services/";
function onSubmit(e) {
@pafmaf
pafmaf / trees.tex
Last active August 29, 2015 14:01
trees in tex with tikz
\documentclass[german,11pt]{article}
\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}
\usetikzlibrary{arrows}
\usetikzlibrary{positioning}
\usetikzlibrary{external}
\usetikzlibrary{graphs,quotes,graphdrawing,arrows.meta,backgrounds}
datatype symbol = String of string;
datatype expr = binOp of etype * binOps * etype
| singleOp of ops * etype
| Tuple of expr list
| Selektion of etype * expr
| Konditional of expr * expr * expr
| Applikation of expr * expr
| Abstraktion of symbol * expr
| Fixpunkt of symbol * symbol * expr;