Skip to content

Instantly share code, notes, and snippets.

View mdziekon's full-sized avatar

Michal Dziekonski (mdz) mdziekon

  • Warsaw, Poland
View GitHub Profile
@n3rdopolis
n3rdopolis / kerneltester.sh
Created April 29, 2023 01:42
Build a Linux kernel with a initrd, to test it and its modules in QEMU with a test script
#! /bin/bash
mkdir -p /var/cache/kerneltest
#Make a file system image for the VM, and mount it.
if [[ -e /var/cache/kerneltest/fs.img ]]
then
rm /var/cache/kerneltest/fs.img
fi
truncate -s 2G /var/cache/kerneltest/fs.img
mkfs.ext4 /var/cache/kerneltest/fs.img
@HarvsG
HarvsG / a-smart-entryphone.md
Last active May 19, 2025 10:55
How I made a dumb Entryphone smart

How I made my doorbell smart

The Problem

I have a simple door entry phone that buzzes when someone rings the bell and lets me 'buzz' them in. I would like some smarts. Firstly I want to be able to notify and automate when someone rings and secondly I would like to be able to buzz people in.

Entry phone systems vary throught the world and so it is unlikely this write-up will work for you, so I have spelt out the general principles I used and the steps I took.

The ingredients:

  • Raspberry Pico W
  • ESP home installed on the above
@DavidJCobb
DavidJCobb / regex.js
Created January 23, 2022 21:02
Helper for defining regexes
//
// This file contains a JavaScript tag function to let you
// define regexes without needing to backslash-escape every
// forward slash in the regex text; good for URLs.
//
function regex(tag) {
return new RegExp(tag.raw, "i");
}
@timhwang21
timhwang21 / curry-record.md
Last active January 9, 2023 21:34
Curry unary functions that take a record as an argument

curryRecord

This is an example of a function whose logic lives in the type definition rather than in the function body.

/**
 * @name `curryRecord`
 *
 * Takes a unary function that takes a record as an argument, and makes the
 * record partially applicable. Returns a new function that takes a partial of