Skip to content

Instantly share code, notes, and snippets.

@fmoor
fmoor / pre-commit
Created September 24, 2024 23:58
Prevent commiting TODO comments with a git hook
#!/usr/bin/env bash
# https://stackoverflow.com/a/7292992
# https://git-scm.com/docs/git-sh-setup
. "$(git --exec-path)/git-sh-setup"
if git diff-index -p -M --cached HEAD -- \
| grep ^+ \
@fmoor
fmoor / main.py
Last active April 1, 2022 16:49
Issue Let's Encrypt certificate using the TLS-ALPN-01 challenge
"""Example issuing TLS certificate using TLS-ALPN-01 challenge.
see also: https://github.com/certbot/certbot/blob/master/acme/examples/http01_example.py
"""
import binascii
import codecs
import contextlib
import os
import threading
@fmoor
fmoor / main.go
Created September 15, 2020 16:07
A cli tool to generate Fibonacci numbers.
// A cli tool to generate Fibonacci numbers.
package main
import "fmt"
func main() {
var a, b uint64 = 0, 1
for a <= b {
fmt.Println(a)
@fmoor
fmoor / README.md
Created May 10, 2020 13:10
build edgedb docker image for arm/raspberry pi