Skip to content

Instantly share code, notes, and snippets.

View dmarticus's full-sized avatar
💻
spinnin' them plates

Dylan Martin dmarticus

💻
spinnin' them plates
View GitHub Profile
@dmarticus
dmarticus / checklist.md
Last active June 1, 2026 14:44
setup list for music production mac

New Mac Setup Checklist

Phase 1: System prep (before installing anything)

  • Sign in to iCloud (or skip if you want a clean slate)
  • Run all pending macOS software updates
  • System Settings → General → Login Items: remove anything you don't recognize
  • System Settings → Notifications: turn off for apps you don't need
  • System Settings → Keyboard → Text Input → Edit: disable smart quotes, autocapitalize, period shortcut, autocorrect
  • System Settings → Trackpad: enable tap to click, three-finger drag (Accessibility → Pointer Control → Trackpad Options)
@dmarticus
dmarticus / claude.md
Created November 7, 2025 20:21
The CLAUDE.md file that I use for my day job at PostHog

Development Guidelines

Philosophy

Core Beliefs

  • Incremental progress over big bangs - Small changes that compile and pass tests
  • Learning from existing code - Study and plan before implementing
  • Pragmatic over dogmatic - Adapt to project reality
  • Clear intent over clever code - Be boring and obvious
@dmarticus
dmarticus / ff_script.py
Created November 20, 2024 19:43
Script that uses the PostHog Python SDK to call feature flags
import os
import json
import backoff
import logging
from posthog import Posthog
# SingletonMeta implementation
class SingletonMeta(type):
_instances = {}
def __call__(cls, *args, **kwargs):
@dmarticus
dmarticus / minimal.zsh-theme
Last active January 6, 2021 00:37
Minimal ZSH theme with a hack that adds the nix_shell status to your prompt
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$fg[white]%}]%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN="]%{$reset_color%} "
ZSH_THEME_SVN_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
ZSH_THEME_SVN_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
ZSH_THEME_SVN_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY
ZSH_THEME_SVN_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN
ZSH_THEME_HG_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
ZSH_THEME_HG_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
@dmarticus
dmarticus / remove.js
Created October 16, 2020 21:17
remove grailed items from closet
[... document.querySelectorAll('#fittingroom > div:nth-child(2) > div.fitting-room-wrapper.feed > div')].filter(item => item.innerText.includes("Sold")).map(filtered => filtered.childNodes[1].childNodes[2].click());
@dmarticus
dmarticus / scroll.js
Last active October 16, 2020 21:18
infinite scrolls the grailed closet to the end of it all
var lastScrollHeight=0;function autoScroll(){var l=document.documentElement.scrollHeight;l!=lastScrollHeight&&(lastScrollHeight=l,document.documentElement.scrollTop=l)}window.setInterval(autoScroll,100);
document.getElementById('gateway-content').remove(); document.getElementById('app').children[0].children[0].classList = [];
import java.io._
import java.nio.charset.CharacterCodingException
import cats.{ ApplicativeError, Defer, MonadError }
import cats.effect._
import cats.implicits._
import com.typesafe.scalalogging.LazyLogging
import scala.concurrent.duration._
@dmarticus
dmarticus / PomToSBT.sh
Last active April 12, 2020 05:27
Convert POM dependencies to SBT dependencies using the ammonite REPL. Useful when trying to migrate a project from maven to SBT.
#!/usr/bin/env amm
// This script converts Maven dependencies from a pom.xml to sbt dependencies.
// It is based on the answers of George Pligor and Mike Slinn on http://stackoverflow.com/questions/15430346/
// - install https://github.com/lihaoyi/Ammonite
// - make this script executable: chmod +x PomDependenciesToSbt
// - run it with from your shell (e.g bash):
// $ ./PomDependenciesToSbt /path/to/pom.xml
import scala.xml._
import $ivy.`org.typelevel::cats-core:2.1.1`, cats._, cats.implicits._
import $ivy.`org.scalatest::scalatest:3.0.8`,org.scalatest._
import $ivy.`org.scalacheck::scalacheck:1.14.0`
import $ivy.`io.monix::monix:3.1.0`
import $ivy.`dev.zio::zio:1.0.0-RC18`
import $ivy.`org.typelevel::cats-effect:2.1.2`
import $ivy.`com.github.chocpanda::scalacheck-magnolia:0.3.1`
import $ivy.`io.chrisdavenport::cats-scalacheck:0.2.0`
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration._