Skip to content

Instantly share code, notes, and snippets.

View andynu's full-sized avatar

Andrew Nutter-Upham andynu

View GitHub Profile
@andynu
andynu / filters_concern.rb
Created October 9, 2025 16:20
example concerns
require 'active_support/concern'
# The {FiltersConcern} provides a <tt>filter_params</tt> scope which takes a hash <tt>{ col1: term, col2: term }</tt>
#
# see app/assets/javascripts/filterable.js
#
# == type sensitive filtering
# * strings - fuzzy search of %term%
# * dates -
# * July - => month
@andynu
andynu / andyfortune.rb
Created September 22, 2025 20:17
andyfortune
#!/usr/bin/env ruby
# # Andy Fortune
#
# A personal quote and wisdom generator that displays random inspirational quotes
# from various sources including Lao Tzu, programming principles, and life philosophy.
#
# ## Usage
# ```bash
# andyfortune # Display a random quote
@andynu
andynu / execplan.md
Created September 3, 2025 19:06
plan/execplan claude code commands

Execute Plan Command

Overview

Execute a numerically-prefixed plan file from the plans folder based on the provided argument.

Instructions

Plan Selection

@andynu
andynu / git-log-all
Created August 21, 2025 18:43
git-log-all me last wekk - shows me what I did last week across all the git folders under cwd.
#!/usr/bin/env ruby
# # Git Log All
#
# A comprehensive git log analysis tool that generates detailed commit reports
# with time-based filtering and author-specific views. Perfect for reviewing
# development activity across different time periods.
#
# ## Features
# - Time-based commit analysis (day, week, month, year)
@andynu
andynu / tmux.conf
Created July 18, 2025 15:53
tmux.conf
# =============================================================================
# BASIC SETTINGS
# =============================================================================
set -s escape-time 1
set -g base-index 1
setw -g pane-base-index 1
set -g history-limit 10000
setw -g automatic-rename off
set-option -g focus-events on
@andynu
andynu / tmux.conf
Created February 24, 2025 20:43
tmux.conf
set -s escape-time 1
set -g base-index 1
setw -g pane-base-index 1
# un-do default
unbind C-b
unbind C-d
@andynu
andynu / linear-bulk-add
Created October 4, 2024 15:12
linear-bulk-add - Just let me paste a bulleted list to create some issues.
#!/usr/bin/env python3
import sys
import requests
import os
import json
LINEAR_API_KEY = os.environ.get('LINEAR_API_KEY')
TEAM_ID = os.environ.get('LINEAR_TEAM_ID')
if not LINEAR_API_KEY or not TEAM_ID:
@andynu
andynu / emailmerge.rb
Created September 11, 2024 13:46
Email merge script in ruby
#!/usr/bin/env ruby
# Encoding: utf-8
#
# This takes a csv file of values, and a txt file as a template
# and sends out a pile of customized emails.
#
require 'csv'
require 'mail'
@andynu
andynu / ajax-frames.js
Created September 4, 2024 16:19
Ajax-frames - Like Turbo Frames (from rails), but you have to specify the target frame for every link.
/* global $ */
/**
* ajax-frames v1.1.0
* pre-requisites: jquery
* compatible with: rails-ujs
*
* Exports:
* - ajax_frames_init(container) - Automatically runs on document ready for the entire document.
* - load_ajax_frames_multi(url)
*
@andynu
andynu / llme.rb
Last active February 27, 2024 22:25
A little ollama client for pre-defined prompts.
#!/usr/bin/env ruby
require 'thor'
require 'uri'
require 'net/http'
require 'json'
# > llme joke
# Sure! Here's one:
#