Skip to content

Instantly share code, notes, and snippets.

View gtkatakura's full-sized avatar

gtkatakura

View GitHub Profile
@gtkatakura
gtkatakura / windows-boxstarter.wsf
Last active March 30, 2025 20:53
Windows 11 - Boxstarter
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
choco install driverbooster
choco install 7zip
choco install adobereader
choco install brave
choco install 1password
choco install obsidian
@gtkatakura
gtkatakura / win11.xml
Created October 19, 2024 23:54 — forked from akitaonrails/win11.xml
My Windows 11 libvirt XML configuration
<domain type='kvm'>
<name>win11-real</name>
<uuid>45768371-b871-4937-b7c2-60ed835011de</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>33554432</memory>
<currentMemory unit='KiB'>33554432</currentMemory>
{"lastUpload":"2019-10-22T22:27:38.860Z","extensionVersion":"v3.4.3"}
// funciona somente com v3.1.6, essa estrategia de end/continue
// era um backdoor para fazer recursao em types, recursao funcionava somente com interfaces
// antigamente pela resolucao de tipos ser lazyness e nao acabar fazendo o compiler cair
// potencialmente em um looping infinito na resolucao do tipo, por causa disto tem validacao
// no compiler agora e codigos nesse estilo sao barrados pelo compiler
type Init<T extends any[], TTail extends any[] = TailArray<T>> = CastArray<{
[K in keyof TTail]: T[keyof T & K];
}>
@gtkatakura
gtkatakura / analysis.draft.md
Created July 29, 2023 18:47 — forked from MattPD/analysis.draft.md
Program Analysis Resources (WIP draft)
@gtkatakura
gtkatakura / boxstarter
Last active March 24, 2023 16:36
Boxstarter - Windows 10
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
cinst googlechrome -y --ignore-checksums
cinst winrar -y --ignore-checksums
cinst 7zip.install -y --ignore-checksums
cinst vlc -y --ignore-checksums
cinst spotify -y --ignore-checksums
cinst discord -y --ignore-checksums
@gtkatakura
gtkatakura / programming-as-theory-building.md
Created October 12, 2022 15:44 — forked from onlurking/programming-as-theory-building.md
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@gtkatakura
gtkatakura / fizzbuzz.ts
Created October 6, 2022 04:21 — forked from Grubba27/fizzbuzz.ts
FizzBuzz made in typelevel
type Reverse<A> =
`${A}` extends `${infer AH}${infer AT}`
? `${Reverse<AT>}${AH}` : A
type Digs = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
type DigsNext<I = Digs, R = {}> =
I extends [infer Head, infer Next, ...infer Tail]
@gtkatakura
gtkatakura / median.ts
Created April 29, 2022 02:17 — forked from Grubba27/statistics.ts
Median of numers
type Reverse<A> =
`${A}` extends `${infer AH}${infer AT}`
? `${Reverse<AT>}${AH}` : A
type Digs = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
type DigsNext<I = Digs, R = {}> =
I extends [infer Head, infer Next, ...infer Tail]
? DigsNext<[Next, ...Tail], R & Record<Head, Next>>
: { [K in keyof R]: R[K] }
@gtkatakura
gtkatakura / 1.md
Created March 24, 2022 16:28 — forked from swyxio/1.md
Learn In Public - 7 opinions for your tech career

2019 update: this essay has been updated on my personal site, together with a followup on how to get started

2020 update: I'm now writing a book with updated versions of all these essays and 35 other chapters!!!!

1. Learn in public

If there's a golden rule, it's this one, so I put it first. All the other rules are more or less elaborations of this rule #1.

You already know that you will never be done learning. But most people "learn in private", and lurk. They consume content without creating any themselves. Again, that's fine, but we're here to talk about being in the top quintile. What you do here is to have a habit of creating learning exhaust. Write blogs and tutorials and cheatsheets. Speak at meetups and conferences. Ask and answer things on Stackoverflow or Reddit. (Avoid the walled gardens like Slack and Discourse, they're not public). Make Youtube videos