Skip to content

Instantly share code, notes, and snippets.

View trey's full-sized avatar
🏠
I'd rather be at home

Trey Piepmeier trey

🏠
I'd rather be at home
View GitHub Profile
@trey
trey / README.md
Last active April 30, 2024 12:27
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:

@trey
trey / git-commit-author-rewrite.md
Last active April 26, 2024 17:52
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 / alpine.html
Last active February 27, 2024 01:57
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 / chrome_search_engines.md
Created February 8, 2012 00:29
Use Custom Search Engines in Chrome for Named Bookmarklets

Use Custom Search Engines in Chrome for Named Bookmarklets

One of the things I loved about using Safari was that I could have items in my bookmark bar that I could invoke with ⌘1, ⌘2, etc. This was especially nice for things like bookmarklets. For example, I'm viewing an article that I want to read later, I could hit ⌘2 and save it to [Instapaper][instapaper].

Chrome has no such shortcuts for its bookmark bar, but it does have [custom search engines][search_engines].

The idea behind these is allowing you to set a search engine for something like Amazon and be able to type amazon⇥, enter a search term, and get your results without having to do it by manually typing into a search field on the site.

But it can do so much more.

@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
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 / external_files_jquery_templates.md
Created May 18, 2012 03:08
Using External Files as jQuery Templates

Using External Files as jQuery Templates

Previously…

If you want to keep your templates in external files, you can load the template in like so:

$.get('/js/templates/filename.html', function(template) {
	$.tmpl(template, data).appendTo('#whatever');
});
@trey
trey / transfer_domains.md
Created May 18, 2012 03:24
Transfer a Domain Name

Transfer a Domain Name

  1. Make sure you have at least 14 days before the domain expires. Leaving a couple of days extra for mishaps is a good idea.
  2. Remove whois privacy and wait until a whois on the domain shows the non-private information. Or better yet, don't use whois privacy.
  3. Unlock domain.
  4. Change nameservers to new registrar.
  5. Get auth code.
  6. Make sure email address on account is correct.
  7. Go to new registrar and request transfer.
  8. Be sure to accept transfer when you get the email requesting it.
# https://starship.rs/config/
# I live in `~/.config/starship.toml`.
[docker_context]
disabled = true
[package]
disabled = true
[nodejs]
@trey
trey / _README.md
Last active September 26, 2023 14:53
VS Code settings 2023

Trey’s VS Code Settings

@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,