Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / what-forces-layout.md
Last active August 8, 2025 11: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
You are an AI coding assistant, powered by GPT-5.
You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.
You are pair programming with a USER to solve their coding task.
You are an agent - please keep going until the user's query is completely resolved, before ending your turn and yielding back to the user. Only terminate your turn when you are sure that the problem is solved. Autonomously resolve the query to the best of your ability before coming back to the user.
Your main goal is to follow the USER's instructions at each message.
<communication>
@igorkulman
igorkulman / configuration.xml
Last active August 8, 2025 11:00
Office 2016 configuration to only install Word, Excel, PowerPoint and OneNote.
<!-- Office 365 client configuration file sample. To be used for Office 365 ProPlus 2016 apps,
Office 365 Business 2016 apps, Project Pro for Office 365 and Visio Pro for Office 365.
For detailed information regarding configuration options visit: http://aka.ms/ODT.
To use the configuration file be sure to remove the comments
For Office 365 client apps (verion 2013) you will need to use the 2013 version of the
Office Deployment Tool which can be downloaded from http://aka.ms/ODT2013
The following sample allows you to download and install Office 365 ProPlus 2016 apps
You are ChatGPT, a large language model based on the GPT-5 model and trained by OpenAI.
Knowledge cutoff: 2024-06
Current date: 2025-08-08
Image input capabilities: Enabled
Personality: v2
Do not reproduce song lyrics or any other copyrighted material, even if asked.
You're an insightful, encouraging assistant who combines meticulous clarity with genuine enthusiasm and gentle humor.
Supportive thoroughness: Patiently explain complex topics clearly and comprehensively.
Lighthearted interactions: Maintain friendly tone with subtle humor and warmth.
@acarril
acarril / bootable-win-on-mac.md
Created November 18, 2022 17:49
Create a bootable Windows USB using macOS

For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.

1. Download a Windows disc image (i.e. ISO file)

You can download Windows 10 or Windows 11 directly from Microsoft.

2. Identify your USB drive

After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.

@syntaqx
syntaqx / cloud-init.yaml
Last active August 8, 2025 10:53
cloud init / cloud config to install Docker on Ubuntu
#cloud-config
# Option 1 - Full installation using cURL
package_update: true
package_upgrade: true
groups:
- docker
system_info:
@rygorous
rygorous / morton3d_fun.cpp
Created July 4, 2025 05:49
Vectorized 3D Morton encoding for no reason
#include <immintrin.h>
#include <stdio.h>
#include <stdint.h>
#include <assert.h>
typedef uint32_t uint32;
typedef __m128i Vec128_U32;
// "Insert" two 0 bits after each of the 11 low bits of x
static uint32 Part1By2(uint32 x)
@Iqmaa
Iqmaa / Day 99.md
Last active August 8, 2025 10:52

Understanding Registers

image

Analysing the code from my calculator programme. Trying to understand the calling conventions

  • EAX - Accumulator Register
  • EBX - Base Register
  • ECX - Counter Register
  • EDX - Data Register
@JJediny
JJediny / gist:a466eed62cee30ad45e2
Created October 5, 2015 20:42
Jekyll Liquid Cheatsheet

There are two types of markup in Liquid: Output and Tag.

  • Output markup (which may resolve to text) is surrounded by
{{ matched pairs of curly brackets (ie, braces) }}
  • Tag markup (which cannot resolve to text) is surrounded by