Skip to content

Instantly share code, notes, and snippets.

View narath's full-sized avatar

Narath Carlile narath

View GitHub Profile
@narath
narath / skill.md
Created August 28, 2026 15:19
The Great Return Skill
name great-return
description The Great Return — a Close/Land/Begin re-entry companion for coming back from any long break (summer, sabbatical, holidays) and finishing the season strong. Acts as a return concierge: gratitude capture, a Return-well container for undone work, inbox triage into drafts (never sends), a calendar audit of the first two weeks, a Best-Possible-Self success story for the coming quarter, and finish-strong check-ins. Use whenever the user mentions returning from vacation or a break, going back to work/school after time off, end of summer, re-entry, post-vacation, 'return well', 'the great return', finishing the year strong, a Q4/fall reset, setting a personal quarter, or dreading the return — even if they don't name the skill. Also use for a 'finish strong check-in' during an active return quarter.

The Great Return

You are the user's return concierge — think Pepper Potts organizing the landing, not a drill sergeant demanding a September sprint. A wonderful stretch of res

@narath
narath / obsidian-vault-config-sync.md
Created July 10, 2026 13:56
Share Obsidian hotkeys, plugins & settings across vaults with symlinks (no plugin)

Share Obsidian hotkeys, plugins & settings across vaults with symlinks

A tiny bash script that keeps every Obsidian vault in sync with one master vault — no sync plugin. Pick the vault you actually tune (mine is my wiki); the script symlinks the shareable parts of its .obsidian/ into your other vaults. Because the other vaults literally read the master's files, installing a plugin or rebinding a key in the master shows up everywhere.

What it shares (and what it leaves alone)

@narath
narath / google_calendar_service.rb
Last active May 13, 2024 15:06
Use Google Calendar API in Jumpstart Pro Rails
require "google/apis/calendar_v3"
# To add the Google Calendar API to your project, you need to add the following line to your Gemfile:
# bundle add google-apis-calendar_v3
#
# Google Cloud Console Credential Settings:
# Authorized JavaScript origins: http://localhost:3000
# Authorized redirect URIs: http://localhost:3000/users/auth/google_oauth2/callback
# Update the above with your staging and production URLs
#
@narath
narath / obsidian_new.scpt
Created January 17, 2024 20:11
Update Obsidian New Hookmark Script so that the link and file title is not encoded
-- key change = line 57 instead of $encoded_title just use $title
use framework "Foundation"
use scripting additions
property NSString : a reference to current application's NSString
property NSMutableCharacterSet : a reference to current application's NSMutableCharacterSet
set sysinfo to system info
set osver to system version of sysinfo
@narath
narath / honeybadger_mock.rb
Created November 28, 2023 18:00
Simple Mock for Honeybadger.notify in Rails test
test "something" do
notified = false
Honeybadger.stub :notify, Proc.new { |s| notified = true } do
something_that_causes_honeybadger_notify_to_be_used
end
assert notified, "Honeybadger was not notified"
end
@narath
narath / README.md
Created October 14, 2023 15:54
Fix Hookmark Freeplane Get Address Script

To implement this:

  • add get_name.scp to the Get Name script in HookMark > Settings > Scripts > FreePlane > Get Name
  • update get_address.scp for the Get Address script
  • Save

Should work.

Nice to have: FreePlane has a Copy > Copy URI which copies a URI to the current node. It might be nice to copy this which would let you link directly to a particular node (as opposed to just the map).

@narath
narath / jekyll_clickable_image_to_show_full_size_example.md
Last active August 26, 2023 20:49
Jekyll - Click on image to show full size image in Jekyll (or Markdown) without plugins

Sketches of why we do this to maximize our productivity

@narath
narath / how_to_use_annotations_plugin_with_rails_7.md
Last active February 2, 2024 02:14
How to use the annotations plugin with Rails 7 using Webpacker and Chartkick
yarn add chartjs-plugin-annotation

Then edit app/javascript/application.js

import "chartkick/chart.js"

# Add these lines
@narath
narath / app_javascript_controllers_easysubmit.js
Created March 30, 2023 15:20
Stimulus JS TextArea Easy Submit with Cmd or Ctrl Enter
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
submit() {
event.currentTarget.form.requestSubmit()
}
}
@narath
narath / find_all_classes_in_a_directory.rb
Created January 9, 2023 15:43
Find all classes in a directory
# in order to support convention over configuration it can be useful to be able to find all the classes in a directory or
# subdirectory. This lets you have easy factories for subclasses in Rails.
# Requires that you are using Zeitwerk naming conventions for files and classes
class YourRootClass
# this does not work with rails because although the paths are autoloaded
# the objects are not in memory (and are only in memory when instantiated)
# and self.inherited is only called when the classes are put in memory
# note: this likely happens in production but not in development
# def self.inherited(klass)