Skip to content

Instantly share code, notes, and snippets.

View reillysiemens's full-sized avatar
🦀
cargo install coffee

Reilly Tucker Siemens reillysiemens

🦀
cargo install coffee
View GitHub Profile

Always Already Programming

Everyone who interacts with computers has in important ways always already been programming them.

Every time you make a folder or rename a file on your computer, the actions you take through moving your mouse and clicking on buttons, translate into text-based commands or scripts which eventually translate into binary.

Why are the common conceptions of programmer and user so divorced from each other? The distinction between programmer and user is reinforced and maintained by a tech industry that benefits from a population rendered computationally passive. If we accept and adopt the role of less agency, we then make it harder for ourselves to come into more agency.

We've unpacked the "user" a little, now let's look at the "programmer." When a programmer is writing javascript, they are using prewritten, packaged functions and variables in order to carry out the actions they want their code to do. In this way, the programmer is also the user. Why is using pre-made scripts seen

@reillysiemens
reillysiemens / Dockerfile
Last active September 29, 2021 10:05
I was wrong and Alex was right.
FROM python:latest
WORKDIR /test
ADD ./app.py /test
RUN pip install flask psycopg2-binary pytest
CMD ["pytest", "app.py"]
@reillysiemens
reillysiemens / bitmask_battleship.rs
Created March 3, 2021 11:07
Battleship, but it's an int.
//! # Bitmask Battleship
//!
//! The ship sections and their status are maintained in a 17-bit mapping. A
//! zero bit means the section is OK and a one means the section has been hit.
//!
//! ```text,ignore
//! 1
//! 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
//! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//! | C | b | c | s | d |
@reillysiemens
reillysiemens / cards.rs
Created August 11, 2019 06:59
Pretty Rust Cards
use std::fmt;
use std::str;
#[derive(Debug)]
pub enum Rank {
Ace,
Two,
Three,
Four,
Five,
@reillysiemens
reillysiemens / signing-vbox-kernel-modules.md
Last active February 25, 2026 23:04
Signing VirtualBox Kernel Modules

Signing VirtualBox Kernel Modules

These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on [Øyvind Stegard's blog][blog], save for a few key details. The images here are borrowed from the [Systemtap UEFI Secure Boot Wiki][systemtap].

  1. Install the VirtualBox package (this might be different for your platform).
    src='https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo'
@reillysiemens
reillysiemens / instructions.md
Last active December 28, 2018 05:27
Create a Windows 10 USB image from Fedora 29

Instructions

The URL https://git.io/this-time-for-real-tho links to the win10-usb.sh script below. It created something bootable from my Fedora 29 workstation.

Try to run

curl -L https://git.io/this-time-for-real-tho | sh

and if that doesn't work try explicitly setting an environment variable for the location of the .iso file

@reillysiemens
reillysiemens / README.md
Created December 19, 2018 23:03
Python Typing Optional String Callback

The Python here works just fine, but mypy doesn't like it...

example.py:14: error: Argument 1 to "callback" has incompatible type "Optional[str]"; expected "str"

The if url is None: conditional should prevent the url in the else block from ever being None, but maybe it doesn't work like that? Or I'm just wrong...

@reillysiemens
reillysiemens / README.md
Created December 19, 2018 05:54
Python Typing Protocol Default Class

This is perfectly fine Python. It outputs

Opening...
Opening...
1337
Closing...

when run, but Mypy complains...

example.py:29: error: Incompatible default for argument "cls" (default has type "Type[Concrete]", argument has type "SupportsOpenClose")
@reillysiemens
reillysiemens / callback.py
Created December 18, 2018 22:06
Python Callback Type Annotation
def fn(
url: str,
state: State,
payload_type: PayloadType,
verify: bool = True,
method: Callable[..., Response] = requests.post,
) -> None:
"""
Given a function with the above signature, how can the type of
``method`` be made more specific?