Skip to content

Instantly share code, notes, and snippets.

Working from home

David Brownman xavdid

Working from home
View GitHub Profile
xavdid /
Last active Feb 12, 2022
A first attempt at AOC 2021 Day 24
# requires Python@3.10
from dataclasses import dataclass, field
from operator import add, floordiv, mod, mul
from typing import Dict, Generator, List
class ALU:
instructions: List[str] = field(repr=False)
inputs: str = field(repr=False)
xavdid /
Last active Sep 19, 2021
Python script to find ENV_VAR keys on your travis projects
import argparse
import os
from math import ceil
from typing import List
import requests
from requests import HTTPError
except ImportError:
print("This script uses the `requests` package")
xavdid / battleships.ts
Created Oct 29, 2020
I don't remember the context in which I wrote this, but I did! Finished it Jan 2017
View battleships.ts
interface Boat {
size: number
direction: 'horizontal'|'vertical'
start: Point
interface Point {
x: number,
y: number

Keybase proof

I hereby claim:

  • I am xavdid on github.
  • I am xavdid ( on keybase.
  • I have a public key whose fingerprint is BA72 F26F 7A12 08FD EA39 C3CE 8E6C 0A2E 2B26 98E9

To claim this, I am signing this object:

xavdid / fast.rb
Last active May 29, 2019
Fast and the Furious Movie Name Generator -
View fast.rb
# run it here:
# fast and furious naming conventions are silly
print "Enter a two-word movie title base phrase: "
title = gets.chomp
parts = title.split(' ')
if parts.size > 2
xavdid / extractor.js
Created Apr 4, 2018
Extracting Items from Timeline
View extractor.js
var items = $(".tl-slider-item-container")
.slice(1); // ignore the first item, it's a title card
var result = $.map(items, j => {
const el = $(j);
return {
year: el.find(".tl-headline-date")[0].innerText,
title: el.find(".tl-headline")[0].innerText,
content: el.find(".tl-text-content")[0].innerText
xavdid / test.js
Created Sep 28, 2017
jsfuck practice
View test.js
get permutations of schedules and assign students to them
import csv
from itertools import permutations
from random import choice
xavdid / crash.txt
Created May 16, 2017
Chrome is crashing a lot today
View crash.txt
May 16 14:49:47 TBP GoogleSoftwareUpdateAgent[71264]: 2017-05-16 14:49:47.684 GoogleSoftwareUpdateAgent[71264/0x7fffb06d03c0] [lvl=2] -[KSAgentApp setupLoggerOutput] Agent settings: <KSAgentSettings:0x100538a30 lastCheck=2017-05-16 17:35:22 +0000 checkInterval=18000.000000 uiDisplayInterval=604800.000000 sleepInterval=1800.000000 jitterInterval=900 maxRunInterval=0.000000 isConsoleUser=1 ticketStorePath=/Users/david/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore runMode=3 logEverything=0 logBufferSize=2048 alwaysPromptForUpdates=0 productIDToUpdate=(null) lastUIDisplayed=(null) alwaysShowStatusItem=0 updateCheckTag=(null) printResults=NO userInitiated=NO>
May 16 14:49:48 TBP ksadmin[71268]: Using ticket store: <KSPersistentTicketStore:0x10070e8e0 store=<KSKeyedPersistentStore:0x10070f120