Skip to content

Instantly share code, notes, and snippets.

View patrickod's full-sized avatar
🔐

Patrick O'Doherty patrickod

🔐
View GitHub Profile
@joeycastillo
joeycastillo / Focus.cpp
Created June 20, 2022 22:37
A simple Focus-based app for tracking progress on projects
#include "Focus.h"
#include "Arduino.h"
#include <algorithm>
Task::Task() {
}
View::View(Rect rect) {
this->frame = rect;
this->window.reset();
@reimundklain
reimundklain / hetzner-dedicated-wipe-and-install-nixos-luks-raid-lvm.sh
Last active December 14, 2023 17:55
Insall NixOS form hetzner rescue system with LUKS RAID1 LVM
#!/usr/bin/env bash
# Installs NixOS on a Hetzner server, wiping the server.
#
# This is for a specific server configuration; adjust where needed.
#
# Prerequisites:
# * Update the script wherever FIXME is present
#
# Usage:
@justinschuldt
justinschuldt / kint36-i3wm-keys-and-vim-layer.json
Created December 8, 2021 06:45
QMK keymap for a Kinesis Advantage2 running the Stapelberg kint36 controller. This keymap provides OS keys for i3wm, and a layer with VIM controls.
{
"version": 1,
"notes": "For QMK Configurator. You can view this by importing it at <https://config.qmk.fm/#/kinesis/kint36/LAYOUT>. It can also be used directly with QMK's source code",
"documentation": "QMK keymap for a Kinesis Advantage2 running the Stapelberg kint36 controller. This keymap provides OS keys for i3wm, and a layer with VIM controls. Build info: <https://github.com/kinx-project/kint> \n",
"keyboard": "kinesis/kint36",
"keymap": "kint36-updated-layer-toggles",
"layout": "LAYOUT",
"layers": [
[
"KC_ESC",
@simonw
simonw / datasette-polar-bears.md
Last active January 17, 2022 21:16
Datasette for Polar Bears
@withzombies
withzombies / crackaddr_vuln.c
Last active April 22, 2025 21:52
halvar's reimplementation of mark dowd's crackaddr vulnerability
/*
Copyright (c) 2011, Thomas Dullien
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. Redistributions
@ddm
ddm / programmer.cfg
Last active December 28, 2023 15:45
rpi zero openocd SWD config
interface bcm2835gpio
# hexdump -s4 -n4 -e '\"0x\" 4/1 \"%02X\"\"\\n\"\" \"' /proc/device-tree/soc/ranges
bcm2835gpio_peripheral_base 0x20000000
# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
# These depend on system clock, calibrated for stock 700MHz
# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET
bcm2835gpio_speed_coeffs 146203 36
@dckc
dckc / Makefile
Last active June 5, 2023 16:01
nix + sandstorm = <3
spk1.spk: sandstorm-pkgdef.capnp sandstorm-files.list
spk pack $@
# Destination (in-package) path must not start with '/': /nix/store/6f...
sandstorm-files.list: result
# nix-store --query --requisites result | sed -e 's,^/,,' >$@
find $$(nix-store --query --requisites `readlink result`) | sed -e 's,^/,,' >$@
result: default.nix
rm -rf result
@bnagy
bnagy / gpgmutt.md
Last active August 10, 2024 22:44
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
anonymous
anonymous / PKGBUILD
Created May 28, 2015 05:08
pkgname=pdf-redact-tools
pkgver=0.1
pkgrel=1
pkgdesc='PDF Redact Tools helps with securely redacting and stripping metadata from documents before publishing'
url='https://firstlook.org/code/project/pdf-redact-tools/'
license=('GPL')
arch=('any')
depends=('imagemagick' 'perl-image-exiftool')
source=("https://github.com/firstlook/pdf-redact-tools/archive/v${pkgver}.tar.gz")
sha1sums=('35c99e52d631305e84ecdd82daa7f352f6cf983a')
@imjasonh
imjasonh / markdown.css
Last active January 3, 2025 20:15
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}