This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import urllib | |
import ijson | |
if len(sys.argv) < 2: | |
url = 'http://registry.npmjs.org/-/all' | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import argparse | |
import logging | |
import os, os.path | |
import re | |
import sqlite3 | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; .emacs file of Chuck Adams <cja987@gmail.com> | |
;; | |
;; Anyone is free to use any part of this file, and I try to keep it | |
;; helpfully commented, but they should know that I haven't kept | |
;; portability foremost. It's really only designed to work on my | |
;; machine, with its own set of customizations. Caveat Hacker. | |
;; | |
;;;;;;;;;;;;;;;; First Things First |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main() | |
function main() { | |
monomorphic() | |
polymorphic() | |
megamorphic() | |
} | |
function bench(label, people) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z $1 ]; then | |
stamp=$(mktemp /tmp/stamp.XXXXXXXX) | |
trap 'rm $stamp' EXIT | |
emacs $HOME/bin | |
find $HOME/bin/ -type f -cnewer $stamp | xargs -r chmod +x | |
exit 0 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Maybe<a> = { val: a, tag = "some" } | { tag: "none" } | |
function isSome<A, Ma: Maybe<a>>(m: Ma): Ma["val"] is A { | |
return m.tag == "some"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// Exact types | |
type Exact<TExpected, TActual extends TExpected> = TExpected extends TActual ? TExpected: never; | |
type Foo = { x: number }; | |
function acceptT<T extends Foo>(input: Exact<Foo, T>) {} | |
//// JSON Schema Type | |
type JSONSchema<T> = T extends number | |
? { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.4' | |
services: | |
caddy: | |
image: caddy:2 | |
restart: "unless-stopped" | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- .docker/caddy/Caddyfile:/etc/caddy/Caddyfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
set show-all-if-ambiguous on | |
set completion-ignore-case on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; recommended for performance and compatibility with future | |
autohotkey releases. | |
#UseHook | |
#InstallKeybdHook | |
#SingleInstance force | |
SendMode Input |
OlderNewer