Skip to content

Instantly share code, notes, and snippets.

Karan Lyons karanlyons

Block or report user

Report or block karanlyons

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@webstrand
webstrand / maptree.ts
Created Mar 29, 2019
Finitely recursive map types using arrays of values as keys. !!FRAGILE!! Don't use any[] for key type, expect heisenbugs.
View maptree.ts
export type MapTree<K extends readonly [unknown, ...unknown[]], V> = {
0: Map<K[number], V>,
1: ((..._: K) => any) extends ((_: infer Head, ...__: infer Tail) => any)
? Tail extends readonly [unknown, ...unknown[]]
? Map<Head, MapTree<Tail, V>>
: never
: never
}[K extends readonly [unknown] ? 0 : 1] & {
setKey(key: Readonly<K>, value: V): void;
getKey(key: Readonly<K>): V | undefined;
@alirobe
alirobe / reclaimWindows10.ps1
Last active Sep 18, 2019
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
View reclaimWindows10.ps1
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@staltz
staltz / introrx.md
Last active Sep 20, 2019
The introduction to Reactive Programming you've been missing
View introrx.md
@brendano
brendano / NOTES.md
Created Jun 12, 2012
Patches to compile ocropus on Mac OSX 10.6 -- see explanation at NOTES.md at bottom https://gist.github.com/2919800#file_notes.md
View NOTES.md

by Brendan O'Connor (http://brenocon.com)

I got all of ocropus to compile on Mac OSX 10.6, though I haven't tested it much yet. This is the current version inside the ocropus hg repository, so approximately version 0.5, with iulib perhaps 0.4ish.

See ocroinst.osx -- the first file in "everything_besides_iulib.diff" -- for line-by-line instructions; the script may even just run. We're assuming Homebrew and pip (see the comments).

You can’t perform that action at this time.