Skip to content

Instantly share code, notes, and snippets.

$ raco pkg install scribble
Resolving "scribble" via https://download.racket-lang.org/releases/8.5/catalog/
Downloading https://download.racket-lang.org/releases/8.5/pkgs/scribble.zip
The following uninstalled packages are listed as dependencies of scribble:
scribble-lib
scribble-doc
Would you like to install these dependencies? [Y/n/a/c/?]
00: Resolving "scribble-lib" via https://download.racket-lang.org/releases/8.5/catalog/
Resolving "scribble-doc" via https://download.racket-lang.org/releases/8.5/catalog/
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin()
Plug 'neovim/nvim-lspconfig'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-buffer'
$ echo '{"a":{"b":"quoted \" } {{{"}}{"c":{"d":2}}{"e":{"f":3}}' | go run firstobject.go
{"a":{"b":"quoted \" } {{{"}}
default 20:39:37.686798-0400 Finder bundle 0x4ff8 is launch-disabled and needs to be set trusted
default 20:39:37.688071-0400 lsd *** Registration warnings for <private>:
default 20:39:37.688087-0400 lsd Missing iTunes metadata
error 20:39:37.693434-0400 lsd LSStringLocalizer development region English not found in localizations available for bundle <private>
default 20:39:37.694953-0400 lsd Non-fatal error enumerating at <private>, continuing: Error Domain=NSCocoaErrorDomain Code=260 "The file “PlugIns” couldn’t be opened because there is no such file." UserInfo={NSURL=PlugIns/ -- file:///Applications/Firefox.app/Contents/, NSFilePath=/Applications/Firefox.app/Contents/PlugIns, NSUnderlyingError=0x1267223d0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
default 20:39:37.695065-0400 lsd - 45683955: Checking whether application is managed at file:///Applications/Firefox.app//org.mozilla.firefox
default 20:39:37.695185-0400 lsd (null):5:4:1:0:_LSServerRegisterItemInfo begin
default 20
@llimllib
llimllib / allowed_answers.txt
Created March 16, 2022 18:54
legal wordle words
cigar
rebut
sissy
humph
awake
blush
focal
evade
naval
serve
@llimllib
llimllib / amenu.py
Created December 28, 2021 17:17
The simplest menu implementation I could come up with in rich
from rich.console import Console
from rich.style import Style
from rich.table import Table
from getchar import getchar
SELECTED = Style(bgcolor="white")
def print_table(console, table, rows=[], selected=0):
for i, row in enumerate(rows):
#!/usr/bin/env python
import re
import requests
import sys
import time
if len(sys.argv) < 2:
print("usage: python oldest.py <username>")
sys.exit(1)
#!/usr/bin/env bash
# many settings from https://raw.githubusercontent.com/mathiasbynens/dotfiles/master/.macos
# many settings from https://raw.githubusercontent.com/thoughtbot/laptop/master/mac
# instructions on finding the default you've changed: https://pawelgrzybek.com/change-macos-user-preferences-via-command-line/
# previous install notes at:
# https://gist.github.com/llimllib/ee591266e05bd880629a4e7511a61bb3
# https://gist.github.com/llimllib/e864a92da94ceb1ef0da2e06fd1f8d70
# https://gist.github.com/llimllib/aa4420cac617774ee2a54d8603d862e4
fancy_echo() {

llimllib's five minute guide to jq

Let's say somebody just asked us to make a frontend for the CFPB's complaint search API, but we've never used it. The first thing we do is just call it, and see a giant blob:

$ curl "https://www.consumerfinance.gov/data-research/consumer-complaints/search/api/v1/geo/states?search_term=test"
{"_scroll_id":"cXVlcnlUaGVuRmV0Y2g7NTs3Mjg1ODU6ZzRIUGF4VEZScjY5Ym1fNG1HRWc3Zzs3Mjg1ODY6ZzRIUGF4VEZScjY5Ym1fNG1HRWc3Zzs2MDg4OTM6RU85cXdTM2tRa2FEbjhUVkdZamwwdzs2MDg4OTI6RU85cXdTM2tRa2FEbjhUVkdZamwwdzs2MDU2NTU6NlFSZXU3eTdTWkNhMkNsQm1mclNFUTswOw==","took":11,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1871,"max_score":0.0,"hits":[]},"aggregations":{"product":{"doc_count":1871,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":614,"buckets":[{"key":"Credit reporting, credit repair services, or other personal consumer reports","doc_count":373,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Credit r