Skip to content

Instantly share code, notes, and snippets.

@sergeyk
sergeyk / explore-plan-code-test.md
Last active July 24, 2025 10:13
Explore - Plan - Code - Test Workflow

At the end of this message, I will ask you to do something. Please follow the "Explore, Plan, Code, Test" workflow when you start.

Explore

First, use parallel subagents to find and read all files that may be useful for implementing the ticket, either as examples or as edit targets. The subagents should return relevant file paths, and any other info that may be useful.

Plan

Next, think hard and write up a detailed implementation plan. Don't forget to include tests, lookbook components, and documentation. Use your judgement as to what is necessary, given the standards of this repo.

If there are things you are not sure about, use parallel subagents to do some web research. They should only return useful information, no noise.

Vim Manipulation Cheat Sheet

Action

Key Result
v select
y copy (yank)
c change
d delete

Crippling Facebook

Facebook works with advertisers to target you. These instructions are one of the many ways to begin crippling that relationship. When AI targeting is crippled, your psychosecurity improves :)

  1. On your desktop machine, goto https://accountscenter.facebook.com/ads/audience_based_advertising
  2. Maximize the browser window
  3. Press F12 and click on the Console tab
  4. Select the code below, copy it, paste it upon the Console line (The area next to the > character in the Console window), and press enter:
@gd3kr
gd3kr / script.js
Created February 15, 2024 06:30
Download a JSON List of twitter bookmarks
/*
the twitter api is stupid. it is stupid and bad and expensive. hence, this.
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes.
When finished, it downloads a JSON file containing the raw text content of every bookmark.
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please?
*/
@jkuester
jkuester / map_reduce.erl
Created January 31, 2024 03:43
Couch view comparison - Erlang vs JS
% Map
fun({Doc}) ->
case proplists:get_value(<<"type">>, Doc, nil) of
<<"telemetry">> ->
{Metadata} = proplists:get_value(<<"metadata">>, Doc, {nil}),
User = proplists:get_value(<<"user">>, Metadata, nil),
Year = proplists:get_value(<<"year">>, Metadata, 0),
Month = proplists:get_value(<<"month">>, Metadata, 0),
Day = proplists:get_value(<<"day">>, Metadata, 0),
GregorianDays = calendar:date_to_gregorian_days(Year, Month + 1, Day + 1),
@mjkstra
mjkstra / arch_linux_installation_guide.md
Last active July 25, 2025 20:50
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
@VanTanev
VanTanev / README.md
Created May 2, 2023 13:01
A github workflow to track progress of convertion JavaScript to TypeScript.

A github workflow to track the progress of converting JavaScript to TypeScript.

Last year, we migrated a large project form JS to TS. We did this with ts-migrate, and we renamed all instances of any to $TSFixMe, to differentiate them from real uses of any.

Tracking the convertion over time

In order to see our progress on removing $TSFixMe, we build the a github workflow that adds comments to PRs with our progress, eg:

image

@jacob-ebey
jacob-ebey / deferred-overview.md
Last active February 28, 2025 05:42
Deferred Overview

Remix Deferred

Remix Deferred is currently implemented on top of React's Suspense model but is not limited to React. This will be a quick dive into how "promise over the wire" is accomplished.

SSR + Hydration

It isn't rocket science, but a quick recap of how frameworks such as react do SSR:

  1. Load data
  2. Render the app
@scastiel
scastiel / SeoHeaders.ts
Last active September 28, 2022 19:55
SeoHeaders.ts
import Head from 'next/head'
export const SeoHeaders = ({
title,
description,
author,
twitterAuthor,
twitterSite,
url,
imageUrl,
// TODO: make `pages` optional and measure the div when unspecified, this will
// allow more normal document flow and make it easier to do both mobile and
// desktop.
import {
createContext,
useCallback,
useContext,
useEffect,
useMemo,
useRef,