Skip to content

Instantly share code, notes, and snippets.

View ManDeJan's full-sized avatar
blep blop

Jan Halsema ManDeJan

blep blop
View GitHub Profile
@ManDeJan
ManDeJan / koekjes.md
Created April 25, 2024 18:11
Koekjes 🍪
  • Boter: 115 gram gezouten boter, verzacht
  • Kristalsuiker: 100 gram
  • Lichtbruine Basterdsuiker: 106.5 gram
  • Pure Vanille-extract: 1 theelepel = 4.2 gram
  • Eieren: 1 groot
  • Bloem: 180 gram
  • Baking Soda: ½ theelepel = 2,4 gram
  • Bakpoeder: ¼ theelepel = 1,25 gram
  • Zeezout: ½ theelepel = 2,6 gram
  • Chocoladedruppels: 200 gram
@ManDeJan
ManDeJan / python-why.py
Created March 7, 2019 22:56
CAR & CDR in 1 line of Python
for _ in map(exec, map(lambda s: f'''{"""""".join(map(chr, range(100, 103)))} c{s}r(l): h,*t=l; return {"c" + s[:-1] + "r(" + ("h)" if s[-1] == "a" else "t)") if s[:-1] else "h" if s[-1] == "a" else "t"}''', [f'{bin(i)[2:].zfill(x)}'.translate({48: 97, 49: 100}) for x in range(10) for i in range(2**10)])): pass
@cjsmeele
cjsmeele / nederc.hh
Created October 23, 2018 15:09
Dit maakt C++ toegankelijker voor senioren ;-)
/**
* \file
* \brief NederC voor Cenioren
* \version 1
*/
#ifndef _NEDERC_HH
#define _NEDERC_HH
#define aligneer_als alignas
#define alignering_van alignof
@larsch
larsch / install-arch-linux-rpi-zero-w.sh
Created July 6, 2017 06:05
Install Arch Linux ARM for Raspberry Pi Zero W on SD Card (with commands to configure WiFi before first boot).
#!/bin/sh -exu
dev=$1
cd $(mktemp -d)
function umountboot {
umount boot || true
umount root || true
}
# RPi1/Zero (armv6h):
@cjsmeele
cjsmeele / better_python3
Last active October 26, 2021 11:52
better_python3
#!/usr/bin/env perl
# This adds the post-inc, post-dec, pre-inc and pre-dec operators to python!
# Additionally, it supports the -O3 optimization feature.
my $optimized = 0;
if (@ARGV and $ARGV[0] eq '-O3') {
shift;
@postspectacular
postspectacular / blinky.S
Created December 12, 2015 23:43
ARM ASM blink example, linker & build scripts
.syntax unified
.cpu cortex-m4
.thumb
// configuration values for STM32F4x
// see: http://www.st.com/web/en/resource/technical/document/reference_manual/DM00031020.pdf
#define AHB1PERIPH_BASE 0x40020000
#define RCC_BASE AHB1PERIPH_BASE + 0x3800
#define RCC_AHB1_ENR RCC_BASE + 0x30