Skip to content

Instantly share code, notes, and snippets.

View travisjungroth's full-sized avatar

Travis Jungroth travisjungroth

View GitHub Profile
season team date rating elo
1871 ATL 1871-10-07 1478.511 1478.809
1871 CHC 1871-10-30 1471.351 1471.722
1871 CL1 1871-09-27 1425.456 1425.26
1871 FW1 1871-08-29 1420.555 1421.763
1871 NY2 1871-10-18 1446.61 1445.148
1871 PH1 1871-10-30 1481.406 1481.057
1871 RC1 1871-09-15 1430.404 1431.09
1871 TRO 1871-10-23 1445.928 1445.261
1871 WS3 1871-09-29 1449.779 1449.89
@travisjungroth
travisjungroth / post-commit.sh
Created January 23, 2023 04:29
Run the pre-commit tool and commit any changes. Save to .git/hooks/post-commit or add as a line.
#!/usr/bin/env bash
messages=$(git log --format=%s -3)
repeated="autocommit
autocommit
autocommit"
if [ "$messages" = "$repeated" ]; then
echo "3 times, enough already."
exit 1
fi
@travisjungroth
travisjungroth / emojify
Last active July 14, 2022 16:17
Script to convert image files to the Slack suggest format: 128x128 PNG with transparent background.
#!/bin/zsh
# this requires imagemagick to run
# brew install imagemagick && brew install ghostscript
# on Mac, download then run `mv ~/Downloads/emojify /user/local/bin/emojify`
# emojify file [output-name]
# examples
# emojify ~/Downloads/img.png winky-face
# emojify ~/Downloads/winky-face.jpg
@travisjungroth
travisjungroth / qwixx.py
Last active June 26, 2023 21:12
The Qwixx dice game in Python. Made to be used with reinforcement learning.
from __future__ import annotations
from abc import abstractmethod
from contextlib import suppress
from dataclasses import dataclass, field
from enum import Enum
from itertools import accumulate, chain
from random import choice, randrange
from typing import ClassVar, Container, Iterable, Literal, Optional, Protocol
@travisjungroth
travisjungroth / recursion.py
Created January 19, 2021 02:20
A tiny introduction to recursion in Python
from typing import List, Optional, Sequence
# A recursive function is a function that calls itself. They're an alternative option to iteration, like using a while
# or for loop. Sometimes, they can make code easier to read and write. The examples below are overly simplified and
# have obviously better alternatives.
def multiply_string(s: str, n: int) -> str:
# There are 3 main parts to a recursive function.
# 1. A way to go to either the base case (no recursion) or recursive case (function calls itself).
@travisjungroth
travisjungroth / clojure-syllabus.txt
Created August 31, 2020 14:30
Clojure Syllabus
PF: Introduction to Clojure V2
PF: 3 Functional Tools
PF: JVM Fundamentals for Clojure
PF: Repl-Driven Development in Clojure
PF: Clojure Collections
PF: Clojure Scope
PF: Recursion 101
PF: Namespaces
PF: Leiningen
PF: Web Development in Clojure
[
{
"date": "1/25/2020",
"title": "The business of SaaS",
"url": "https://stripe.com/atlas/guides/business-of-saas"
},
{
"date": "5/19/2021",
"title": "Do The Real Thing",
"url": "https://www.scotthyoung.com/blog/2020/05/04/do-the-real-thing/"
from graphs import depth_first_connected_nodes_iterative
graph = {
'A': {
'B',
},
'B': {
'C',
'D',
from collections import deque
from typing import Dict, Hashable, MutableSet, MutableSequence, Set, TypeVar, Union, Generic, List, Generator
Node = Hashable
Adjacent = Union[MutableSequence[Hashable], MutableSet[Hashable]]
def depth_first_connected_nodes_iterative(graph: Dict[Node, Adjacent],
start: Node) -> Set[Node]:
to_visit = [start]
all-[name] - channels everyone should be on
ask-[name] - channel to interact with a team
team-[name] - channel for a team
proj-[name] - channels about work with an end date (prolly cross functional)
talk-[name] RF specific endless discussions (hiring)
pings-[name] channels that go beep (intercom, code-reviews)
client-[name] channel shared with a client (not to talk about them!)
chat-[name] - general subject discussions not RF specific (design, travel, music, product)