Skip to content

Instantly share code, notes, and snippets.

View chrisjrn's full-sized avatar

Christopher Neugebauer chrisjrn

View GitHub Profile
@chrisjrn
chrisjrn / naur-1985.md
Last active March 24, 2026 18:31
"Programming as Theory Building", P. Naur (1984/85)
# Dependencies and source files
files(
name="package-config",
sources=["package.json", "yarn.lock",],
dependencies=[],
)
# The source files themselves
files(
name="js-sources",
@chrisjrn
chrisjrn / 2022-psf-board-platform.md
Last active September 10, 2024 12:35
2022 chrisjrn PSF Board Platform

I’m Christopher Neugebauer (he/him/his), a long-time organiser in the Python community, originally from Australia, and now based in the United States. I’m a maintainer of the Pantsbuild open source project, am a past PyCon Australia organiser, and current (dormant) North Bay Python organiser. I served as a past board member in 2018-2021.

My priorities for this term are:

  • Reducing the foundation’s reliance on PyCon US’s success to fund our work
  • Ensuring that PyCon US remains a place where the entire community can gather safely
  • Rebuilding our Grants policy to support an environment where online and hybrid events are more common

I served on the board from 2018 to 2021, and am looking to return as the Foundation needs to make some significant decisions as we emerge from the shadow of COVID. My focus is on making sure that the board functions well, so that we can equip the rest of the community to do good work.

During my first term, I served on the PyCon US Committee, helping to guide the conference throug

Fast and reproducible tests, packaging, and deploys with Pantsbuild’s hermetic environments

“Works on my machine”: The cry of developers who can’t reproduce a bug because their development environment is incompatible with their deployment environment. It’s common because setting up clean environments is slow, tedious, and error-prone.

Meanwhile, debugging errors introduced by incorrect environments is slow, tedious, and error-prone.

Each step in your CI workflow theoretically only has inputs or outputs, but in reality, files can be left along the way by running tests or compiling extensions. These are side-effects, not inputs for subsequent steps in your workflow, let alone deployment, but if included they can affect correctness.

You can solve this using “hermetic environments”: running every step of your workflow inside a fresh environment, so steps run truly independently of one another. You can do this manually with Docker, but it’s difficult: you have to understand which inputs are necessary for a s

alias git-delete-squashed='git checkout -q master && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base master $branch) && [[ $(git cherry master $(git commit-tree $(git rev-parse $branch\^{tree}) -p $mergeBase -m _)) == "-"* ]] && git branch -D $branch; done'
@chrisjrn
chrisjrn / homebrew_shellenv.sh
Created July 12, 2021 20:42
Homebrew for arch-specific shells
#!/bin/sh
# HOW TO USE:
# 1. Install homebrew to the default location in an ARM shell (`arch -arm64 zsh`) then in an intel shell (`arch -x86_64 zsh`)
# 2. Save this file somewhere in your home directory
# 3. Add the following command to your ~/.zprofile file: eval "$(zsh ~/bin/homebrew_shellenv.sh)"
ARCH=`arch`
if [[ "$ARCH" = "arm64" ]]
@chrisjrn
chrisjrn / homebrew_shellenv.sh
Created May 10, 2021 20:52
Run the correct homebrew shellenv based on arch
#!/bin/sh
ARCH=`arch`
if [[ "$ARCH" = "arm64" ]]
then
BIN_BREW="/opt/homebrew/bin/brew"
else
BIN_BREW="/usr/local/Homebrew/bin/brew"
fi

Hello Pythonistas!

Saturday, November 2nd is coming up fast, and we wanted to let you know that we are going ahead with North Bay Python 2019!

If you or your friends have been holding off on buying tickets until this week, now’s the time to buy tickets at https://northbaypython.org/attend

Here’s our update on where things are at, and what you can expect at the event.

SMOKE & AIR QUALITY:

Petaluma’s air quality has been variable, with AQI readings in the last day from 0-50 at best, to 100-150 at worst. These changes can happen rapidly as wind shifts, so it's difficult for us to predict how it'll be this weekend.

'''
wget -r --mirror --page-requisites SOURCE_DOMAIN -D SOURCE_DOMAIN --adjust-extension
'''
import os
import sys
basedir = sys.argv[1]
directories = []