Skip to content

Instantly share code, notes, and snippets.

View gourneau's full-sized avatar
🎯
Focusing

Joshua Gourneau gourneau

🎯
Focusing
View GitHub Profile
@gourneau
gourneau / 00-SUMMARY.md
Last active June 18, 2026 21:05
SDRGB / SDLED00 stuck-device diagnostic — macOS 26.5 25F71. Card reader sees SDLED00 but it never enumerates as a block device (absent from diskutil list).

SDRGB / SDLED00 — stuck-device diagnosis

Host: Mac16,1 (Apple M4), macOS 26.5 (25F71) Captured: 2026-06-18 Connection: built-in SD card reader (PCIe), not USB Companion data: see sdrgb-diag-final.txt in this gist (full diskutil, system_profiler USB + card reader, filtered 1-day log show).


@gourneau
gourneau / node_exporter_install.sh
Created January 16, 2025 22:55
Install bare metal prometheus node_exporter on Redhat distros.
#!/bin/bash
# Exit immediately if a command exits with a non-zero status.
set -e
# Variables
NODE_EXPORTER_VERSION="1.8.2"
NODE_EXPORTER_USER="node_exporter"
NODE_EXPORTER_BINARY="/usr/local/bin/node_exporter"
NODE_EXPORTER_SERVICE="/etc/systemd/system/node_exporter.service"
@gourneau
gourneau / dream.py
Created November 7, 2023 23:44
dream.py
import base64
import json
import sys
import uuid
from openai import OpenAI
import requests
from environs import Env
@gourneau
gourneau / mac.md
Created June 19, 2023 05:32
mac setup
# Demo SSL server
# Make your keys like this
# openssl req -new -x509 -keyout localhost.pem -out localhost.pem -days 365 -nodes
import http.server, ssl
server_address = ('0.0.0.0', 443)
import os
import requests
from pprint import pprint
import time
from statistics import mean, median, median_grouped
def get_prices(verbose=False):
cookies = {}
import time
import subprocess
import os
import re
import glob
import sys
from blinkytape import BlinkyTape
devices = glob.glob("/dev/cu.usbmodem*")
@gourneau
gourneau / dask-custom-workflow.ipynb
Created April 19, 2017 08:24
Dask Custom Workflow example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pandas as pd
import json
with open("acs.json") as git_json:
git = json.load(git_json)
df = pd.DataFrame(git["gitinspector"]["blame"]["authors"])
df["rows"].sum()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.