Skip to content

Instantly share code, notes, and snippets.

View johnmccabe's full-sized avatar
💀

John McCabe johnmccabe

💀
View GitHub Profile
@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active March 6, 2026 14:27
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf [email protected]:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."[email protected]:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
@BretFisher
BretFisher / docker-for-mac.md
Last active April 6, 2026 02:03
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@johnmccabe
johnmccabe / timeout_buffered_error_channel.go
Created April 11, 2017 14:51
Dealing with Timeout via a buffered error channel
package main
import (
"fmt"
"log"
"time"
)
func work() error {
for i := 0; i < 1000; i++ {
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 30, 2026 20:08
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@alexellis
alexellis / FAASD_MULTIPASS.md
Last active July 31, 2021 01:50
FAASD_MULTIPASS.md