Skip to content

Instantly share code, notes, and snippets.

View h12w's full-sized avatar

Hǎi-Liàng "Hal" Wáng h12w

View GitHub Profile
@h12w
h12w / find_word_by_length_and_alphabetical_value.go
Created June 17, 2022 12:56
Find all English words by its length and sum of alphabetical value of letters
package main
import (
"bufio"
"fmt"
"log"
"os"
"strings"
)
@h12w
h12w / keybase.md
Created December 27, 2018 09:47
keybase.md

Keybase proof

I hereby claim:

  • I am h12w on github.
  • I am h12 (https://keybase.io/h12) on keybase.
  • I have a public key ASAk36t8r7J_CMh-pz7tnId5tDHlYJZRwJ7sFREszZRXrAo

To claim this, I am signing this object:

@h12w
h12w / goclean.sh
Last active August 24, 2021 03:13
golcean.sh does automatic checking on a Go package and its sub-packages.
#!/bin/bash
# The script does automatic checking on a Go package and its sub-packages, including:
# 1. gofmt (http://golang.org/cmd/gofmt/)
# 2. goimports (https://github.com/bradfitz/goimports)
# 3. golint (https://github.com/golang/lint)
# 4. go vet (http://golang.org/cmd/vet)
# 5. race detector (http://blog.golang.org/race-detector)
# 6. test coverage (http://blog.golang.org/cover)
set -e
package main
import (
"fmt"
"runtime"
"time"
)
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
package main
import (
"fmt"
"runtime"
"sync"
"time"
)
func main() {
package main
import (
"fmt"
"runtime"
"sync"
"time"
)
func main() {
package main
import (
"fmt"
"runtime"
"sync"
"time"
)
func main() {