Skip to content

Instantly share code, notes, and snippets.

View johnlindquist's full-sized avatar
💭
Eating a taco 🌮

John Lindquist johnlindquist

💭
Eating a taco 🌮
View GitHub Profile
@johnlindquist
johnlindquist / gist:2c2c94006cd8d8fe161d55ab504c5ce3
Created September 11, 2025 15:31
Yabai window management script - move window right to next space
# Move Window Right - Yabai Window Management Script
## Overview
This Bash script is part of a macOS window management system using Yabai. It moves the currently focused window to the next space to the right, automatically creating a new space if the window is already at the rightmost space.
## Purpose
- **Primary function**: Move the active window one space to the right
- **Edge case handling**: Creates a new space when at the rightmost position
- **Focus management**: Ensures the moved window remains focused after the operation
@johnlindquist
johnlindquist / move_window_right.sh
Created September 11, 2025 15:28
Yabai window management script - move window right to next space
#!/usr/bin/env bash
# ---------- move_window_right.sh ----------
# Moves the current window to the next space, creating one if necessary.
# --- Script Setup ---
SCRIPT_NAME="move_window_right"
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
LOGGER_SCRIPT_PATH="$SCRIPT_DIR/log_helper.sh"
# Log the start of the script
@johnlindquist
johnlindquist / move_window_right.sh
Created September 11, 2025 15:24
Yabai window management script: move_window_right.sh
#!/usr/bin/env bash
# ---------- move_window_right.sh ----------
# Moves the current window to the next space, creating one if necessary.
# --- Script Setup ---
SCRIPT_NAME="move_window_right"
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
LOGGER_SCRIPT_PATH="$SCRIPT_DIR/log_helper.sh"
# Log the start of the script
@johnlindquist
johnlindquist / move_window_right.sh
Created September 11, 2025 15:21
Yabai window management script: Move window to the right space (next space) with automatic space creation at edge. This script is part of a comprehensive macOS window management system using Yabai. It intelligently moves the focused window to the next space on the current display, creating a new space if the window is at the rightmost edge. Feat…
#!/usr/bin/env bash
# ---------- move_window_right.sh ----------
# Moves the current window to the next space, creating one if necessary.
# --- Script Setup ---
SCRIPT_NAME="move_window_right"
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
LOGGER_SCRIPT_PATH="$SCRIPT_DIR/log_helper.sh"
# Log the start of the script
@johnlindquist
johnlindquist / move_window_right.sh
Created September 11, 2025 14:55
Yabai Window Management Script: Move Window Right - Intelligently moves the focused window to the next space on the current display, creating a new space if at the rightmost edge. Features comprehensive logging, state tracking, and robust error handling for macOS window management automation.
#!/usr/bin/env bash
# ---------- move_window_right.sh ----------
# Moves the current window to the next space, creating one if necessary.
# --- Script Setup ---
SCRIPT_NAME="move_window_right"
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
LOGGER_SCRIPT_PATH="$SCRIPT_DIR/log_helper.sh"
# Log the start of the script
#!/usr/bin/env bash
# ---------- move_window_right.sh ----------
# Moves the current window to the next space, creating one if necessary.
# --- Script Setup ---
SCRIPT_NAME="move_window_right"
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
LOGGER_SCRIPT_PATH="$SCRIPT_DIR/log_helper.sh"
# Log the start of the script
@johnlindquist
johnlindquist / open-tab.scpt
Created September 11, 2025 14:50
AppleScript to open URLs in browser tabs
-- open-tab.scpt
-- AppleScript to always open a URL in a new tab in a browser
-- Usage: osascript open-tab.scpt <url> [browser]
on run argv
if (count of argv) < 1 then
error "Usage: osascript open-tab.scpt <url> [browser]"
end if
set targetURL to item 1 of argv
// Name: Create egghead lesson from markdown
import "@johnlindquist/kit"
import axios, { AxiosInstance } from 'axios';
import matter from 'gray-matter';
import { basename, dirname, resolve } from 'path';
import { z } from 'zod';
const DEBUG_ENABLED = true;
// Name: summarize-latest-claude-print-video
import "@johnlindquist/kit"
import { GoogleGenAI, createUserContent, createPartFromUri } from '@google/genai';
const GEMINI_API_KEY = await env("GEMINI_API_KEY")
const ai = new GoogleGenAI({ apiKey: GEMINI_API_KEY });
@johnlindquist
johnlindquist / all-chapters-tightened.md
Created June 14, 2025 03:43
Concatenated tightened chapters 1-8 (editorial pass)

Chapter 1: The Glitch in the Weave

Marcus Chen stared at the floating form hovering three inches above his desk, its ethereal blue glow casting shadows across his cramped office cubicle. The document pulsed gently, waiting for his signature—just another soul-binding contract in the endless stream of metaphysical paperwork that kept the universe running.

"Initial here, here, and here," droned his supervisor, a translucent being whose corporeal form had long since been optimized away for efficiency. "Sign at the bottom. Standard non-disclosure about the nature of reality's backend systems."

Marcus's hand cramped as he gripped the Cosmic Quill™, its reality-ink shimmering between states of existence. Six months into his internship at the Department of Ontological Affairs, and he still wasn't used to the way the job literally bent reality around bureaucratic procedures. Every spell, every miracle, every act of magic in the world required proper documentation. Dragons needed permits to hoard gold. Even sponta