This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
did:3:kjzl6cwe1jw149lkwiavaxlr4b0vy59j94rvg0fjx86ujtmzp4unjz87t3su0nh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use_nvmrc.fish | |
# TODO: save this in `$HOME/.config/fish/conf.d` | |
# `nvm use` whenever .nvmrc is present in $PWD when using fish shell | |
# when traveling deeper, use the parent .nvmrc unless otherwise set | |
# also go back to default nvm when leaving the nvmrc-specified zone | |
function set_nvm --on-event fish_prompt | |
# if the current directory hasn't changed, do nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to run this script in one step, copy/paste/execute the following: | |
# bash <(curl -s https://gist.githubusercontent.com/krry/9263570/raw/878797c4e54f9de71137699544567c6bd2d4f6c4/os-x-for-hackers) | |
#!/usr/bin/env bash | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Ask for the administrator password upfront | |
sudo -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "golang.org/x/tour/pic" | |
func Pic(dx, dy int) [][]uint8 { | |
grid := make([][]uint8, dy) | |
for y := range grid { | |
line := make([]uint8, dx) | |
for x := range line { | |
line[x] = uint8(y-x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"0b111111": { | |
"hexagram": "䷀", | |
"kingwen": 1, | |
"name": { | |
"chinese": "乾", | |
"pinyin": "Qián", | |
"english": "The Creative (Heaven)" | |
}, | |
"trigramPair": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* from | |
https://inclusive-components.design/tooltips-toggletips/ | |
"The visually-hidden class corresponds to some special CSS we've discussed before on Inclusive Components. | |
It hides the <span> visually without stopping it from being read out in screen readers." | |
*/ | |
.visually-hidden { | |
clip-path: inset(100%); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// only touching the Crawl func, as instructed | |
// https://tour.golang.org/concurrency/10 | |
// Crawl uses fetcher to recursively crawl | |
// pages starting with url, to a maximum of depth. | |
func Crawl(url string, depth int, fetcher Fetcher) { | |
m := map[string]bool{url: true} | |
var mx sync.Mutex | |
var wg sync.WaitGroup | |
var subcrawl func(string, int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"golang.org/x/tour/tree" | |
"fmt" | |
) | |
// Walk walks the tree t sending all values | |
// from the tree to the channel ch. | |
func Walk(t *tree.Tree, ch chan int) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"golang.org/x/tour/pic" | |
"image" | |
"image/color" | |
"math/rand" | |
"fmt" | |
) |
NewerOlder