Skip to content

Instantly share code, notes, and snippets.

View gurgeous's full-sized avatar

Adam Doppelt gurgeous

  • Seattle, WA
View GitHub Profile
@gurgeous
gurgeous / prettier-plugin-align-type-comments.mjs
Created May 24, 2026 02:06
prettier-plugin-align-type-comments - align trailing // xxxxx comments in ts types
// Prettier plugin for aligning trailing `//` comments on single-line TypeScript
// type members during normal Prettier formatting. Golang does this and I was
// jealous. Written by codex, works great for me, caveat emptor.
//
// BEFORE
// type Hello = {
// world: string; // this is the world
// foo: string; // bad news
// something_else: number; // the rest
@gurgeous
gurgeous / run_kit.rb
Last active April 6, 2026 02:06
RunKit - essentials for scripts and glue
# Shared runtime helpers for text/csv/json IO, shell cmds, bannners, etc.
require "csv"
require "digest"
require "json"
require "open3"
module RunKit
module_function
@gurgeous
gurgeous / tailwind.go
Created January 16, 2026 18:13
tailwind color palette for golang
package main
//
// tailwind color palette
//
var Tailwind = &tailwind{
Rose: palette{
c50: "#fff1f2",
c100: "#ffe4e6",
module AmazingPrint
#
# add custom colors
#
send(:remove_const, :CUSTOM_RGB_COLORS) if const_defined?(:CUSTOM_RGB_COLORS)
CUSTOM_RGB_COLORS = {
chartreuse: "#7fff00",
deepskyblue: "#00bfff",
gold: "#ffd700",
// ==UserScript==
// @name Gmail Navbar Width
// @namespace http://tampermonkey.net/
// @match https://mail.google.com/mail/u/*
// @description Make the gmail navbar on the left a bit smaller
// @version 0.0.4
// @homepageURL https://gist.github.com/gurgeous/98c38b591151a83145a9c55a6629d752
// @updateURL https://gist.github.com/gurgeous/98c38b591151a83145a9c55a6629d752/raw/gmail-navbar-width.user.js
// @downloadURL https://gist.github.com/gurgeous/98c38b591151a83145a9c55a6629d752/raw/gmail-navbar-width.user.js
// ==/UserScript==
@gurgeous
gurgeous / justfile
Created December 7, 2024 01:55
Sample rails+vite justfile (see https://github.com/casey/just)
# add node_modules to $PATH
export PATH := justfile_directory() + "/node_modules/.bin:" + env_var('PATH')
# first recipe is always default - list these rules
default:
@just --list
# everything ok? good to run before commit
check:
@for i in tsc lint test vitest; do \
@gurgeous
gurgeous / v
Created January 24, 2024 17:16
#!/bin/bash
set -euo pipefail
# sanity checking
if [[ $# -ne 1 ]] ; then
echo 'usage: v <file>'
exit 0
fi
if ! [ -f "$1" ]; then
@gurgeous
gurgeous / reload.osa
Created September 24, 2022 15:48
reload a chrome tab when a file changes
#
# Reload localhost tabs. Sample usage:
#
# $ brew install watchexec
# $ watchexec --watch <DIRNAME> reload.osa
#
tell application "Google Chrome"
set window_list to every window
repeat with the_window in window_list
def tally(data, ii)
Hash.new(0).tap do |h|
data.each { h[_1[ii]] += 1 }
end
end
n = data.first.length
# part 1
gamma = (0...n).map do |ii|
1000tablets.com
100sildenafil.com
100viagra.com
20tadalafil.com
365tablets.com
366pills.com
555meds.com
555pharmacy.com
999pills.com
999tabs.com