openpgp4fpr:E7D07DDE4DF3BB99503C5094F3F37DC5D98BEF21
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
// Code generated by protoc-gen-go. DO NOT EDIT. | |
// versions: | |
// protoc-gen-go v1.27.1-devel | |
// protoc v3.17.3 | |
// source: foo.proto | |
package foo | |
import ( | |
_ "github.com/envoyproxy/protoc-gen-validate/validate" |
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
### Keybase proof | |
I hereby claim: | |
* I am rodaine on github. | |
* I am rodaine (https://keybase.io/rodaine) on keybase. | |
* I have a public key whose fingerprint is E7D0 7DDE 4DF3 BB99 503C 5094 F3F3 7DC5 D98B EF21 | |
To claim this, I am signing this object: |
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
BenchmarkMutexCache/10-8 10000000 180 ns/op 0 B/op 0 allocs/op | |
BenchmarkMutexCache/100-8 10000000 187 ns/op 0 B/op 0 allocs/op | |
BenchmarkMutexCache/1000-8 10000000 214 ns/op 0 B/op 0 allocs/op | |
BenchmarkMutexCache/10000-8 10000000 231 ns/op 0 B/op 0 allocs/op | |
BenchmarkMutexCache/100000-8 5000000 254 ns/op 2 B/op 0 allocs/op | |
BenchmarkMutexCache/1000000-8 1000000 1159 ns/op 102 B/op 1 allocs/op | |
BenchmarkMutexCache/10000000-8 1000000 1481 ns/op 184 B/op 2 allocs/op | |
BenchmarkMutexCache/100000000-8 1000000 1655 ns/op 187 B/op 3 allocs/op | |
BenchmarkSyncMapCache/10-8 5000000 221 ns/op 0 B/op 0 allocs/op |
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
#!/usr/bin/env bash | |
[ $# -eq 1 ] || (echo "Usage: ${0} PORT" && exit 1) | |
echo "capturing HTTP/2 headers on ${1}" | |
tshark -i lo0 \ | |
-l -Q \ | |
-T fields \ | |
-E aggregator="|" \ | |
-e tcp.port \ |
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
// RateLimit middleware limits the throughput to h using TickerLimiter | |
// configured with the provided rps and burst. The request will idle | |
// for the passed in wait before cancelling if there is a queue. | |
func RateLimit(rps, burst int, wait time.Duration, h http.HandlerFunc) http.HandlerFunc { | |
l, _ := TickerLimiter(rps, burst) | |
return func(w http.ResponseWriter, r *http.Request) { | |
t := time.NewTimer(wait) | |
select { | |
case <-l: |
Based on the Tomorrow Night Eighties theme
Paste the following in the Preferences > Sidebar Theme > Custom Theme import/export field:
#2d2d2d,#393939,#6699cc,#FFFFFF,#515151,#cccccc,#99cc99,#f2777a
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
func handleUpload(u io.Reader) (err error) { | |
// capture all bytes from upload | |
b, err := ioutil.ReadAll(u) | |
if err != nil { | |
return | |
} | |
// wrap the bytes in a ReadSeeker | |
r := bytes.NewReader(b) |
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
### Keybase proof | |
I hereby claim: | |
* I am rodaine on github. | |
* I am rodaine (https://keybase.io/rodaine) on keybase. | |
* I have a public key whose fingerprint is 3A81 0489 67F8 B7E0 1D4C 1198 00AD F8A1 DA5A D971 | |
To claim this, I am signing this object: |
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
<?php | |
class Bar | |
{ | |
public function getSomething() | |
{ | |
return 'something'; | |
} | |
} |
NewerOlder