Skip to content

Instantly share code, notes, and snippets.

View inooid's full-sized avatar

Boyd Dames inooid

View GitHub Profile
@venables
venables / README.md
Last active July 23, 2026 11:33
Herdr + Ghostty native keybindings (2 config files)

Herdr + Ghostty native-shortcut keybindings

Two files that give Herdr macOS-native keyboard shortcuts inside Ghostty.

  • ghostty/config — maps native chords (cmd+t, cmd+w, cmd+d, cmd+opt+hjkl, etc.) to the escape / CSI-u sequences Herdr listens for. Merge these into your ~/.config/ghostty/config.
  • herdr/config.toml — Herdr's own keymap. Only the overrides to Herdr defaults live here; anything omitted uses the default the ghostty chords
@locxter
locxter / oc-profile.md
Last active August 2, 2026 01:50 — forked from yeoweizheng/oc-profile.sh
OpenCode Profile Switcher

OpenCode Profile Switcher — Installation & Usage Guide

A POSIX shell script for switching between multiple opencode authentication accounts on the same provider — without manually editing auth.json every time.


How the Script Works

The Problem It Solves

export const chaosTestStrings = (): void => {
const textNodes = getAllTextNodes(document.body);
for (const node of textNodes) {
const textNodeLength = node.textContent ? node.textContent.length : 0;
if (node.textContent === null) {
return;
}
if (node.parentElement instanceof Element) {
if (node.parentElement.dataset.originalText === undefined) {
const createLogger = (backgroundColor, color) => {
const logger = (message, ...args) => {
if (logger.enabled === false) {
return;
}
console.groupCollapsed(
`%c${message}`,
`background-color: ${backgroundColor}; color: ${color}; padding: 2px 4px;`,
...args
@paulirish
paulirish / what-forces-layout.md
Last active July 31, 2026 12:39
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
R = React.DOM
nations = ['britain', 'ireland', 'norway', 'sweden', 'denmark', 'germany',
'holland', 'belgium', 'france', 'spain', 'portugal', 'italy', 'switzerland']
Typeahead = React.createClass
getInitialState : -> {input: ""}
handleChange : -> @setState input: @refs.field.getDOMNode().value
handleClick : (nation)-> @setState input: nation
matches : (input)->
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 25, 2026 13:41
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE