Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / what-forces-layout.md
Last active January 13, 2026 08:10
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
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="Scripts/jquery-1.9.1.min.js"></script>
<link href="Content/bootstrap.min.css" rel="stylesheet" />
<script src="Scripts/isRockFx.js"></script>
<script>
$(function () {

Google Antigravity for Fiction Writers

Reference Guide

What is Antigravity?

Google Antigravity is an AI-powered IDE (development platform) designed for software development, but it can be powerfully repurposed for manuscript analysis, editing, and story bible management.

Key capabilities for writers:

  • Multi-agent parallel processing: Run multiple editing/analysis tasks simultaneously
  • Persistent knowledge base: Agents learn your world-building, character voices, and writing patterns over time
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active January 13, 2026 08:03
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
@mihow
mihow / load_dotenv.sh
Last active January 13, 2026 08:02
Load environment variables from dotenv / .env file in Bash
# The initial version
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
# My favorite from the comments. Thanks @richarddewit & others!
set -a && source .env && set +a
@jamesy0ung
jamesy0ung / Microsoft Static Activation Keys
Created September 26, 2020 22:37
Microsoft Static Activation Keys for many Microsoft products
Access 2003 Developer Extensions: KHCYK-2DXWD-6D4BV-9D9K6-TT9RY
Access 2003: HVCBT-WQ823-BHMJC-RQJ3P-9T9VT
Advanced Threat Analytics (ATA): F3JM7-7QNWQ-KKFVP-PDDRT-4M6P7
Automatic Graph Layout: HWQWP-RXKVP-PJ4BB-9KD87-K67H2
Commerce Server 2002: QJY77-8G8BD-3FYFQ-FDFH3-4RDCP
CRM 2011 Server Edition: 36D7J-FR6QG-JXPF6-H449P-2P6RR
CRM 2011 Workgroup Server Edition: 73B26-GWVRK-GDX7X-MDQBX-DH28R
CRM 3.0 Professional Edition: D2Q47-3K4QX-FPVDT-P4QT6-3C8H8
CRM 3.0 Small Business Edition: TD7BB-D2H87-27KJH-VMH3P-QTQYW
CRM 4.0 Enterprise Edition: WQWYD-FHH7F-XQPCK-2B8KG-D6VT3
@AmmarAhm3d
AmmarAhm3d / unblockfiles.bat
Created December 28, 2025 13:44
Script to unblock files from viewing in powetoys peek
@echo off
SET "TargetDir=C:\PATH\TO\DIRECTORY"
SET "DocExtensions=*.docx","*.doc","*.xlsx","*.xls","*.pptx","*.ppt","*.pdf","*.csv","*.txt"
echo Removing Mark of the Web from documents in %TargetDir%...
REM Loop through specified document extensions and unblock files
powershell -Command "Get-ChildItem -Path '%TargetDir%' -Recurse -Include %DocExtensions% | Unblock-File -ErrorAction SilentlyContinue"
echo Done.
@aabiji
aabiji / apollonian_gasket.py
Last active January 13, 2026 07:54
Simple script to generate an apollonian gasket
import math, cmath
import pygame
class Circle:
def __init__(self, x, y, curvature):
self.center = complex(x, y)
self.curvature = curvature
self.radius = abs(1 / curvature)
def descartes_theorem(k1, k2, k3):
@mpociot
mpociot / ralph-test.sh
Created January 10, 2026 12:09
Ralph for tests
set -e
if [ -z "$1" ]; then
echo "Usage: $0 <iterations>"
exit 1
fi
for ((i=1; i<=$1; i++)); do
echo "Iteration $i"
result=$(claude -p "@test-coverage-progress.txt \