Skip to content

Instantly share code, notes, and snippets.

View beejjorgensen's full-sized avatar
🐇
Doin' things!

Brian "Beej Jorgensen" Hall beejjorgensen

🐇
Doin' things!
View GitHub Profile

Keybase proof

I hereby claim:

  • I am beejjorgensen on github.
  • I am beej (https://keybase.io/beej) on keybase.
  • I have a public key ASCiX3ExlcEy-50-gU3UZLrLUvJHDwbo0FmsV5hXrCb7two

To claim this, I am signing this object:

@beejjorgensen
beejjorgensen / webserver.go
Last active October 28, 2018 17:33
Super-simple logging webserver
package main
import (
"log"
"net/http"
)
func logf(handler http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
log.Printf("%s %s %s", r.RemoteAddr, r.Method, r.URL)
def line_segment_intersect(x1, y1, x2, y2, x3, y3, x4, y4):
"""
Compute line segment intersection.
Line 1: (x1, y1) to (x2, y2)
Line 2: (x3, y3) to (x4, y4)
returns intersection (px, py)
returns None with no intersection.
@beejjorgensen
beejjorgensen / c
Last active October 11, 2022 19:12
A simple command line calculator, wrapper around Python
#!/usr/bin/env python
#
# A command line calculator
#
# Just a wrapper around Python
#
# Put the expression in single quotes if it contains special shell
# characters.
#
@beejjorgensen
beejjorgensen / mb.typ
Created November 9, 2025 23:04
Quick and dirty Mandelbrot renderer in Typst
// typst compile mb.typ
#let pagewidth = 11 // in
#let pageheight = 8.5 // in
#set page(
width: pagewidth * 1in,
height: pageheight *1in,
)
@beejjorgensen
beejjorgensen / PKGBUILD
Created June 15, 2026 21:42
PKGBUILD for scantools 1.0.7
# Maintainer: Tobias Bachmann <tobachmann@gmx.de>
pkgname=scantools
pkgver=1.0.7
pkgrel=1
pkgdesc="scantools is a library and a matching set of command line applications for graphics manipulation, written with a view towards the handling of scanned documents and generation of high-quality PDF files."
arch=('x86_64')
url="https://kebekus.gitlab.io/scantools/"
license=('GPL')
depends=('qpdf' 'qt5-imageformats' 'gcc' 'graphviz' 'jbig2dec' 'libjpeg-turbo' 'libtiff' 'openjpeg2' 'tesseract' 'qpdf' 'qt5-base' 'zlib' 'poppler-qt5' 'zopfli')
makedepends=('cmake' 'doxygen' 'git')
# Maintainer: Kyle Keen <keenerd@gmail.com>
pkgname=primerl
pkgver=2.4a
pkgrel=1
pkgdesc="A sci-fi roguelike, based on ZAPM."
arch=('i686' 'x86_64')
url="http://prime-rogue.net/"
license=('GPL')
depends=('ncurses' 'gcc-libs' 'libsigsegv' 'lua51' 'sdl_net' 'sdl_mixer')
makedepends=('fpc') # whhhhyyyyy
@beejjorgensen
beejjorgensen / umoria-5.7.15-aur.patch
Created June 22, 2026 19:02
Updated patch file for AUR umoria
diff -Naur umoria-5.7.15/src/config.cpp umoria-5.7.15-aur/src/config.cpp
--- umoria-5.7.15/src/config.cpp 2021-06-02 07:04:31.000000000 -0700
+++ umoria-5.7.15-aur/src/config.cpp 2026-06-22 11:45:46.386710007 -0700
@@ -10,18 +10,18 @@
// Data files used by Umoria
// NOTE: use relative paths to the executable binary.
namespace files {
- const std::string splash_screen = "data/splash.txt";
- const std::string welcome_screen = "data/welcome.txt";
- const std::string license = "LICENSE";