Skip to content

Instantly share code, notes, and snippets.

ENTRY(_start)
SECTIONS
{
. = 0x0;
.text : { *(.text) }
.rodata : { *(.rodata) }
}
@VictorKoenders
VictorKoenders / gpg_is_a_fuck.md
Last active May 31, 2022 13:10
Getting yubikey to work with code signing on a new machine

Install

On ubuntu, install:

sudo apt install wget gnupg2 gnupg-agent dirmngr cryptsetup scdaemon pcscd secure-delete hopenpgp-tools yubikey-personalization
libssl-dev swig libpcsclite-dev

On macos, install homebrew and run

# The database url to connect to
# To create a new database, run `./migrations/migrate.sh`
database = "postgres://localhost/mail"
## Set this to a valid value to receive command line debug info
## Leave empty for no debugging
## Valid values: "error", "warn", "info", "debug", "trace"
##
## smpt_to_postgress currently outputs these 2 channels:
## "info": information about:
@VictorKoenders
VictorKoenders / todo.md
Last active February 23, 2022 15:51
Home server todo
@VictorKoenders
VictorKoenders / laptop.md
Last active May 2, 2022 08:24
Laptop comparison

Note: this list was made in februari 2022, things will have changed

Requirements

  • Must run linux
  • Must be confirmed to charge from usb-c
  • Must be confirmed to work with a usb-c docking station
  • Shippable before the 28th
  • More CPU = better

|Stat|Dell|Lenovo|Macbook|Slimbook|System76 kudu|

// Auto generated with gen_basic.py
// See that file for more info
pub fn parse_coordinate(buffer: &[u8]) -> Option<(u16, &[u8])> {
match (buffer.get(0), buffer.get(1), buffer.get(2), buffer.get(3), buffer.get(4)) {
(Some(b'0'), Some(b' '), _, _, _) => Some((0, 2)),
(Some(b'1'), Some(b' '), _, _, _) => Some((1, 2)),
(Some(b'2'), Some(b' '), _, _, _) => Some((2, 2)),
(Some(b'3'), Some(b' '), _, _, _) => Some((3, 2)),
(Some(b'4'), Some(b' '), _, _, _) => Some((4, 2)),
  • What if? Serious scientific answers to absurd hypothetical questions
    Randall Munroe
    ISBN 978-1-84854-956-2

  • Dune
    Frank Herbert
    ISBN 978-340-69019-6

  • Eragon (Dutch)

@VictorKoenders
VictorKoenders / uart.rs
Last active November 25, 2021 08:14
rp-hal uart proposal
// Usage:
let pins = ( // TX, RX
pins.gpio0.into_mode(),
pins.gpio1.into_mode(),
);
let pins = ( // TX, RX, CTS, RTS
pins.gpio0.into_mode(),
pins.gpio1.into_mode(),
pins.gpio2.into_mode(),
pins.gpio3.into_mode(),
use embedded_time::duration::Microseconds;
use rp2040_hal::pac::timer::RegisterBlock;
use rp2040_hal::pac::TIMER;
pub struct Timer {
_timer: TIMER,
}
impl Timer {
pub fn new(timer: TIMER) -> Self {