Skip to content

Instantly share code, notes, and snippets.

View narath's full-sized avatar

Narath Carlile narath

View GitHub Profile
@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 / 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 / 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 / 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 / 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
#