Skip to content

Instantly share code, notes, and snippets.

View paulmach's full-sized avatar

Paul Mach paulmach

  • Cisco Inc.
  • Oakland, CA
View GitHub Profile
@paulmach
paulmach / serve.go
Last active March 25, 2024 11:11
Simple Static File Server in Go
/*
Serve is a very simple static file server in go
Usage:
-p="8100": port to serve on
-d=".": the directory of static files to host
Navigating to http://localhost:8100 will display the index.html or directory
listing file.
*/
package main
### Keybase proof
I hereby claim:
* I am paulmach on github.
* I am paulmach (https://keybase.io/paulmach) on keybase.
* I have a public key ASD-u3EKAps9Uwzwr6IwdhMRJCaJw8yLXM2JzoiKI6KarQo
To claim this, I am signing this object:
@paulmach
paulmach / consistent.go
Last active August 29, 2015 14:27
Check uniformity of consistent hash using crc32
package main
import (
"log"
"math/rand"
"time"
"github.com/strava/go.serversets/fixedset"
"github.com/strava/go.serversets/mcset"
)