Skip to content

Instantly share code, notes, and snippets.

View trey's full-sized avatar
🐢
Slow and steady

Trey Piepmeier trey

🐢
Slow and steady
View GitHub Profile
@trey
trey / reset.sass
Created July 31, 2008 20:36
Eric Meyer's reset.css in Sass. Originally by @postpostmodern.
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain) */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
@trey
trey / happy_git_on_osx.md
Last active March 23, 2026 03:31
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@trey
trey / LICENSE
Last active August 26, 2025 09:16
Nicely Formatted Anti-Capitalist License
ANTI-CAPITALIST SOFTWARE LICENSE (v 1.4)
Copyright © 2020 Arthur L. Piepmeier III @trey
This is anti-capitalist software, released for free use by individuals and
organizations that do not operate by capitalist principles.
Permission is hereby granted, free of charge, to any person or organization
(the "User") obtaining a copy of this software and associated documentation
files (the "Software"), to use, copy, modify, merge, distribute, and/or sell
@trey
trey / git-commit-author-rewrite.md
Last active August 4, 2025 10:11
Change the email address for a git commit.

Change the email address for a git commit.

$ git commit --amend --author="Author Name <email@address.com>"

or

$ git commit --amend --reset-author
@trey
trey / ghostty.conf
Created March 4, 2025 19:59
Ghosty settings
font-size = 18
font-family = Rec Mono Duotone
shell-integration-features = no-cursor
cursor-color = dodgerblue
cursor-style = block
theme = light:alabaster, dark:afterglow
window-height = 30
window-width = 100
background-opacity = 0.8
background-blur = true
@trey
trey / gist:2555876
Created April 30, 2012 06:00
TextExpander snippet to create a Markdown link with title from URL's title (from clipboard)
#!/usr/bin/env ruby -wKU
require 'open-uri'
# get the clipboard using pbpaste
clip = %x{__CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 pbpaste}
URI.parse(clip).open do |f|
f.each {|l|
if md = (/<title>\s*(.*)\s*<\/title>/iu).match(l) then
@trey
trey / .eleventy.js
Last active January 18, 2025 01:35
Display Image Exif Data in 11ty
const responsiveImage = require('./src/_includes/shortcodes/responsive-image');
const exifData = require('./src/_includes/shortcodes/exif-data');
// …
module.exports = function(eleventyConfig) {
// …
eleventyConfig.addShortcode('responsiveImage', responsiveImage);
@trey
trey / setup-uv.sh
Created October 26, 2024 16:07
convert a project using pip-tools to use uv
while read line; do uv add "$line"; done < requirements/requirements.in
@trey
trey / alpine.html
Last active August 27, 2024 09:33
JavaScript confirmation message with Alpine.js and htmx
<!--
https://alpinejs.dev/directives/on#prevent
https://github.com/alpinejs/alpine/issues/150#issuecomment-580452229
-->
<form x-data action="/something" @submit.prevent="if (confirm('Are you sure?')) $el.submit()" method="post">
<button aria-label="Delete this">[some icon]</button>
</form>
@trey
trey / README.md
Last active May 20, 2024 21:00
Cheat Sheet: J Dilla

I love this playlist so much and I would be sad if it went away. Now I’ll have the track names in any case.

27 hours and 3 minutes of shuffle-friendly goodness.

Howto

  1. In Spotify: select all tracks, copy, then paste them into a text file.
  2. Run shell script (which uses my url script).

Shell script: