Skip to content

Instantly share code, notes, and snippets.

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 April 25, 2025 08:23
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,
@mrjones-plip
mrjones-plip / cht-install-bare-metal-couch.txt
Last active May 26, 2022 23:44
Developer Install CHT - bare metal couchdb
# a quick way to install a CHT instance. Uses bare metal couchdb
# see docker based install here: https://gist.github.com/mrjones-plip/7bbe7b0a44ce7876a551b9730c6fc43d
#
sudo apt update
sudo apt dist-upgrade
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion