Skip to content

Instantly share code, notes, and snippets.

View sbuss's full-sized avatar

Steven Buss Bacio sbuss

View GitHub Profile
@sbuss
sbuss / Prop D
Last active December 19, 2023 00:30
# Added
Section 1. Article I, Chapter 5 of the Campaign and Governmental Conduct Code is
hereby amended by adding Section 1.503, to read as follows:
SEC. 1.503. AMENDMENT OR REPEAL OF THIS CHAPTER.
The voters may amend or repeal this Chapter 5. The Board of Supervisors may amend this
Chapter 5 if all of the following conditions are met:
(a) The amendment furthers the purposes of this Chapter;
(b) The Ethics Commission approves the proposed amendment in advance by at least a fourfifths vote of all its members;
(c) The proposed amendment is available for public review at least 30 days before the
@sbuss
sbuss / chatgpt-streaming-zip.md
Created December 16, 2022 02:31
Asking ChatGPT to read a streaming zip file and parse out just the filenames

Me: write a python function that streams a zip file from a URL, reads its infolist, and exits without downloading the entire file

Sure! Here's a Python function that streams a zip file from a URL, reads its infolist, and exits without downloading the entire file:

import zipfile
import requests

def stream_zip_info(url):
 # Send an HTTP GET request to the URL
every SF address: https://data.sfgov.org/Geographic-Locations-and-Boundaries/Addresses-with-Units-Enterprise-Addressing-System/ramy-di5m
assessor records: https://data.sfgov.org/Housing-and-Buildings/Assessor-Historical-Secured-Property-Tax-Rolls/wv5m-vpq2
Join on Block & Lot
[43435.468216] xhci_hcd 0000:09:00.2: WARN: TRB error for slot 6 ep 10 on endpoint
[43435.468225] xhci_hcd 0000:09:00.2: WARN: TRB error for slot 4 ep 4 on endpoint
[43435.468236] xhci_hcd 0000:09:00.2: WARN waiting for error on ep to be cleared
[43435.468237] xhci_hcd 0000:09:00.2: WARN: TRB error for slot 6 ep 4 on endpoint
[43435.468240] xhci_hcd 0000:09:00.2: WARN: TRB error for slot 6 ep 2 on endpoint
[43435.473224] NVRM: GPU at PCI:0000:09:00: GPU-70b5b453-ba71-87d0-7eb0-5c5121a9beb8
[43435.473227] NVRM: GPU Board Serial Number:
[43435.473231] NVRM: Xid (PCI:0000:09:00): 61, pid=1484, 0cde(308c) 00000000 00000000
[43435.486189] xhci_hcd 0000:09:00.2: WARN waiting for error on ep to be cleared
[43435.486193] xhci_hcd 0000:09:00.2: WARN waiting for error on ep to be cleared
@sbuss
sbuss / main.go
Last active August 15, 2019 20:23
Stackdriver logging with request grouping for App Engine Go 1.11
// Sample logging-quickstart writes a log entry to Stackdriver Logging.
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strings"

Keybase proof

I hereby claim:

  • I am sbuss on github.
  • I am sbuss (https://keybase.io/sbuss) on keybase.
  • I have a public key whose fingerprint is 1F46 668C 4263 E13B FB68 FF2B 5252 852B 5824 DDC0

To claim this, I am signing this object:

import sys
# import from 21 Bitcoin Library
from two1.commands.config import Config
from two1.lib.wallet import Wallet
from two1.lib.bitrequests import BitTransferRequests
wallet = Wallet()
username = Config().username
requests = BitTransferRequests(wallet, username)
@sbuss
sbuss / gist:769da082fe987b9e0838
Last active February 17, 2016 23:01
virtualbox natdnshostresolver1 CNAME compression completely wrong, corrupted

The public dockerhub registry has two CNAMEs in its DNS record. Here's a healthy dig response from an OSX-10.9.5 host:

sbuss@sbuss-local$ dig registry-1.docker.io

; <<>> DiG 9.8.3-P1 <<>> registry-1.docker.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50936
$ nse deis-store-admin
root@13481c677b62:/app# ceph -s
cluster 552f0536-9da1-4472-be9d-5e1697d1d3bb
health HEALTH_WARN
2 near full osd(s)
pool .rgw.buckets has too few pgs
mon.ip-10-128-1-31.counsyl.com low disk space
mon.ip-10-128-1-32.counsyl.com low disk space
mon.ip-10-128-2-225.counsyl.com low disk space
mon.ip-10-128-3-24.counsyl.com low disk space
@sbuss
sbuss / gist:41d7dbc79a9e33a2c7c5
Created July 24, 2015 16:38
deis etcdctl watch
core@ip-10-128-3-24 ~ $ etcdctl watch /deis --recursive --forever | awk '{now=strftime("%F %T%z\t");sub(/^/, now);print}'
2015-07-24 16:37:28+0000 8888
2015-07-24 16:37:28+0000 10.128.3.140:60974
2015-07-24 16:37:28+0000 10.128.1.32
2015-07-24 16:37:28+0000 10.128.1.31
2015-07-24 16:37:28+0000 10.128.3.140:59072
2015-07-24 16:37:28+0000 5432
2015-07-24 16:37:29+0000 10.128.1.31
2015-07-24 16:37:29+0000 8888
2015-07-24 16:37:29+0000 10.128.3.24:63735