Skip to content

Instantly share code, notes, and snippets.

@kentcdodds
kentcdodds / class-fields.js
Created April 3, 2018 16:00
Example of using class fields
// Use class fields!
// https://github.com/tc39/proposal-class-fields
// Here's what you might be doing today...
class A extends B {
constructor(...args) {
super(...args)
this.foo = 'bar'
this.foobar = `${this.foo}bar`
}
@kentcdodds
kentcdodds / comments.js
Created April 3, 2018 15:16
A handy trick with multiline code comments I learned from Matt Zabriskie
// here's a handy trick:
/*
console.log('any code')
/**/
// It takes just one character change
@evanwill
evanwill / gitBash_windows.md
Last active October 24, 2024 17:27
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so