Skip to content

Instantly share code, notes, and snippets.

View BryanJBryce's full-sized avatar
🐐

Bryan Bryce BryanJBryce

🐐
View GitHub Profile
@BryanJBryce
BryanJBryce / josevalim-unit-tests-transcript.md
Created October 10, 2026 02:58
Transcript: José Valim on unit tests and layered design (x.com/josevalim/status/2108663976855052797)

José Valim — unit tests side-project video (transcript)

Source: https://x.com/josevalim/status/2108663976855052797 · auto-transcribed with Whisper, unedited

[0:00] Hey, everyone, so there has been many discussions on unit testing lately. And I think part of the discussion is that we likely understand different things about what unit testing is and what it is as a practice. So I thought I would record a video of a project that I'm working on and how I am writing tasks for it, okay? So this project, I'm working on it with the help of coding agents, right? I am not writing the code, but I am reviewing the code and I'm providing design directions. And in order to understand what the project does, so it is, you can write laws about Erlang and Elixir programs and you can prove them in me.

[0:49] So I'm going to give a little bit of context because that's going to be really helpful to understand the design of the project, okay? So imagine that like, so a RtypeSystem is coming to Elixir, right? So imagin

@BryanJBryce
BryanJBryce / copy_prod_to_staging.sh
Last active January 13, 2025 15:11
Copy Postgres prod to staging when connected via Wireguard
#!/bin/bash
# Script to copy production database to staging environment
set -e # Exit on any error
if [ -z "$PROD_DATABASE_URL" ] || [ -z "$STAGING_DATABASE_URL" ]; then
echo "Error: Database URLs not found in environment"
echo "Make sure you have set up .envrc with PROD_DATABASE_URL and STAGING_DATABASE_URL"
exit 1
fi
import Foundation
import Actor
import MessageRouter
public final class Core<State, Event, Command> {
public typealias CommandProcessor = (Core<State, Event, Command>, Command) -> Void
public typealias EventHandler = (State, Event) -> CoreUpdate<State, Command>
public let stateChanged = MessageRouter<State>()

Keybase proof

I hereby claim:

  • I am bryanjbryce on github.
  • I am bryanbryce (https://keybase.io/bryanbryce) on keybase.
  • I have a public key ASBAe_kEOjWTbAAAzJg_WlZOSqjv9tK8AsGfrE4un1rY2go

To claim this, I am signing this object:

@BryanJBryce
BryanJBryce / Readme.md
Last active January 18, 2024 11:46 — forked from adricasti/Readme.md
nRF52 Toolchain Setup in Mac OS X

Equipment

  • MacOS Sierra 10.12.5
  • MacBook Pro (Retina, 13-inch, Late 2012)
  • nRF52-DK (PCA10040)

Toolchain Setup

  1. Install GCC
@BryanJBryce
BryanJBryce / MirrorDebugDecscription.swift
Created January 28, 2016 17:59 — forked from mcmurrym/MirrorDebugDecscription.swift
A default protocol implementation for CustomDebugStringConvertible that uses Mirror for introspection. This is meant for debugging only.
public extension CustomDebugStringConvertible {
var debugDescription: String {
return debugDescription()
}
func debugDescription(indentationLevel: Int = 0) -> String {
let indentString = (0..<indentationLevel).reduce("") { tabs, _ in tabs + "\t" }
var s = "\(self.dynamicType)"
@BryanJBryce
BryanJBryce / parsing.swift
Last active August 29, 2015 14:26 — forked from chriseidhof/parsing.swift
JSON Parsing in Swift
// This code accompanies a blog post: http://chris.eidhof.nl/posts/json-parsing-in-swift.html
//
// As of Beta5, the >>= operator is already defined, so I changed it to >>>=
import Foundation
let parsedJSON : [String:AnyObject] = [
"stat": "ok",
"blogs": [