Skip to content

Instantly share code, notes, and snippets.

View tmcw's full-sized avatar
💭
merging your prs

Tom MacWright tmcw

💭
merging your prs
View GitHub Profile
(-------------List output---------- )
0.187042 0.645075
0.193207 0.648417
0.199533 0.651622
0.206013 0.654685
0.212638 0.657603
0.219399 0.660371
0.226287 0.662985
0.233294 0.665442
0.24041 0.667738
(-------------List output---------- )
-0.00122166 -0.00773919
0.0583786 0.00420576
0.080896 0.00804865
0.0936988 0.0130573
0.100379 0.0424473
0.108123 0.0565801
0.101391 0.0665227
0.0921094 0.0633638
0.102654 0.084326
(-------------Off output---------- )
OFF 110 0 64
-0.00189951 0.0009937
0.0934656 0.403658
0.0962753 0.323667
0.0983542 0.196518
0.0986576 0.358754
0.0992546 0.456116
0.100818 0.00124446
0.104639 0.494215
@tmcw
tmcw / README.md
Last active July 11, 2019 23:19
Mediocre vim code intelligence with ctags

Though I love vim, it has one pretty big flaw: it doesn't know JavaScript. There are systems that know JavaScript pretty well, like all of Visual Studio Code’s code intelligence features. I've tried all of them: languageserver, tern, typescript server… and they've all broken my heart. And then I went back to the opposite extreme: no autocomplete, no fancy stuff, not even the supertab plugin. Now I've settled in the middle, and am loving mediocre vim. The combination is:

ctags

Ctags is a beautifully ugly system, with extreme performance and simplicity. Just enough intelligence to pluck out the exports and declarations in your files to make jump to definition work mostly. It's basically a set of regular expressions that tries to find keywords and then puts them in a file that your editor can use as an index.

brew install ctags-exuberant
@tmcw
tmcw / bad-in-the-middle.md
Last active July 9, 2019 21:32
It's bad in the middle

It's bad in the middle

Trigger warning: this post talks about money. Skip it if you don’t want to read about money. For real: compensation, money – the whole thing stresses me out. I wrote it because I strongly suspect something’s going on, and that this suspicion has been confirmed a few times, and I think it’s worthwhile to sketch it all out. I take care not to name any numbers here: though you can make very little money in startups and many people manage to, a lot of people also make a lot of money, and the absurdity of the amounts never wears off, ever, and the jealousy will eat you. Note also that I’m not an accountant or a lawyer and this post has nothing to do with my current or previous employers.

Diagnosis:

  • Early stage startups give you equity for cheap, freedom
  • Public tech companies give you cash, liquid equity, stability
  • Middle stage startups are chaotic, less equity and at a worse price, and not as much cash as late-stage startups
#!/bin/zsh
ipfs daemon &
PID1=$!
echo "Jekyll building…"
bundle exec jekyll build
cd _site
make-relative https://macwright.org/
#!/bin/zsh
ipfs daemon &
PID1=$!
echo "Jekyll building…"
bundle exec jekyll build
cd _site
make-relative https://macwright.org/
#!/bin/zsh
ipfs daemon &
PID1=$!
echo "Jekyll building…"
bundle exec jekyll build
cd _site
make-relative https://macwright.org/
@tmcw
tmcw / README.md
Created March 5, 2019 20:16
Image version navigator

If you version images like person-1.jpg person-2.jpg, this will let you swap an img element for a Timg component, and clicking on the image cycles through previous versions.

[{"ingredients":["Creme de Cacao","Vodka"],"name":"'57 Chevy with a White License Plate"},{"ingredients":["Dark rum","Light rum","Vodka","Orange juice"],"name":"155 Belmont"},{"ingredients":["Absolut Citron","Orange Curacao","Strawberry liqueur","Orange juice"],"name":"9 1/2 Weeks"},{"ingredients":["Vodka","Peach schnapps","Orange juice","Cranberry juice"],"name":"A Gilligan's Island"},{"ingredients":["Amaretto","Lemon","Ice","Maraschino cherry"],"name":"A True Amaretto Sour"},{"ingredients":["White Creme de Menthe","Southern Comfort","Vodka","Hot chocolate"],"name":"A.D.M. (After Dinner Mint)"},{"ingredients":["Gin","Grand Marnier","Lemon Juice","Grenadine"],"name":"A1"},{"ingredients":["Gin","Sweet Vermouth","Orange Juice","Angostura Bitters"],"name":"Abbey Martini"},{"ingredients":["Absolut Citron","Sweet and sour","Sprite","Soda water","Lemon"],"name":"Absolut Summertime"},{"ingredients":["Vodka","Cranberry Juice","Champagne"],"name":"Absolutely Fabulous"},{"ingredients":["Absolut Citron","Orange juice","