Skip to content

Instantly share code, notes, and snippets.

View joechrysler's full-sized avatar

Joe Chrysler joechrysler

  • Atomic Object
  • Grand Rapids, Michigan
View GitHub Profile
@joechrysler
joechrysler / tmux-wrapper
Created February 16, 2026 14:32
tmux-wrapper
# Alias: alias t='tmux-wrapper'
#!/usr/bin/env zsh
# Get list of sessions
sessions=$(tmux list-sessions -F "#{session_name}" 2>/dev/null)
if [ -z "$sessions" ]; then
# No sessions exist, create a new one
exec tmux new-session -s "$(date +'%Y-%m-%d %H:%M')"
else
@joechrysler
joechrysler / open-obsidian-vault
Created February 16, 2026 14:29
open-obsidian-vault
# Alias: alias ov='open-obsidian-vault'
#!/usr/bin/env zsh
if [[ -z "$PROJECT_ROOT" ]]; then
echo "Error: \$PROJECT_ROOT is not set. Are you in a direnv-managed project?" >&2
exit 1
fi
vault_dir=$(find "$PROJECT_ROOT" -maxdepth 3 -name ".obsidian" -type d 2>/dev/null | head -1)
@joechrysler
joechrysler / claude-notify
Created February 16, 2026 14:28
claude-notify
#!/usr/bin/env bash
# Claude Code notification hook — uses Sonnet to describe what needs attention
# Notifications are delayed 60s and cancelled if the user returns.
#
# Hook configuration (in .claude/settings.json):
# "hooks": {
# "Notification": [
# { "matcher": "permission_prompt",
# "hooks": [{ "type": "command", "command": "claude-notify 🏡 permission" }] },
# { "matcher": "idle_prompt",
@joechrysler
joechrysler / tmux-wrapper
Created February 7, 2026 12:59
A nice session picker for tmux
#!/usr/bin/env zsh
# Get list of sessions
sessions=$(tmux list-sessions -F "#{session_name}" 2>/dev/null)
if [ -z "$sessions" ]; then
# No sessions exist, create a new one
exec tmux new-session -s "$(date +'%Y-%m-%d %H:%M')"
else
# Show picker with existing sessions and a New option

Keybase proof

I hereby claim:

  • I am joechrysler on github.
  • I am joechrysler (https://keybase.io/joechrysler) on keybase.
  • I have a public key whose fingerprint is 71C8 5928 84FB 0525 82DB 61EA 5741 DED0 F064 E9A9

To claim this, I am signing this object:

@joechrysler
joechrysler / move_completed_reminders_to_dayone
Last active December 27, 2015 05:24
SCRIPT to move completed reminders into a DayOne journal
on run {input, parameters}
tell application "Reminders"
if (count of (reminders whose completed is true)) > 0 then
set todoList to reminders whose completed is true
repeat with itemNum from 1 to (count of (reminders whose completed is true))
set reminderObj to item itemNum of todoList
set nameObj to name of reminderObj
set compDateObj to completion date of reminderObj
if (body of reminderObj) is not "" and (body of reminderObj) is not missing value then
set bodyObj to " Notes: " & body of reminderObj
git checkout -b new_branch # make the new branch so you don't lose commits
git push origin new_branch:new_branch # push your new branch to github so github doesn't lose commits
git checkout master # switch to master so that you're resetting master, not your new branch
git reset --hard cbedd62 # move master back to the last commit it should be on
git checkout master # you should be at the old commit.
git push -f origin master:master
@joechrysler
joechrysler / weirdness.sh
Last active January 3, 2016 04:19
A test...
#!/usr/bin/env bash
mkdir weirdness
cd weirdness
git init
echo "hello" > file
git add file
git commit -m "add file"
echo ''
<script>
window.onload = function (e) {
var my_image = document.getElementById("image_id"); // Get a reference to the image tag
var d = new Date(); // Instantiate a new date object
if (d.getDay() == 3) { // Sunday = 0, Monday = 1, etc... // If today is Wednesday
my_image.src = "path/to/other/image.png"; // Change the image's src attribute
}
}
</script>
@joechrysler
joechrysler / pep8-break.py
Created July 30, 2013 18:33
PEP8 Line Breaks
# In our codebase, we do a lot of this:
if some_really_long_boolean
and another_really_long_boolean
and a_third_really_long_boolean:
print "Yehaw!"
# PEP8 says we should probably be writing thusly
if some_really_long_boolean and
another_really_long_boolean and
a_third_really_long_boolean: