Skip to content

Instantly share code, notes, and snippets.

View douglarek's full-sized avatar

douglarek

View GitHub Profile

Keybase proof

I hereby claim:

  • I am douglarek on github.
  • I am xinlingchao (https://keybase.io/xinlingchao) on keybase.
  • I have a public key ASCADdYM3GJLi9fgF8sCGUPWNBQFrzdowCjou-24g7JwOwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am douglarek on github.
  • I am xinlingchao (https://keybase.io/xinlingchao) on keybase.
  • I have a public key ASCGOFuwmYyq8Ib56s_nl-wrq3b4KvKZaMoMiENJ-wrY5Ao

To claim this, I am signing this object:

$ CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install -v 3.7.0
@douglarek
douglarek / ksql-server.properties
Created May 16, 2018 08:12
Recommended KSQL Production Settings
# Set the retries to Integer.MAX_VALUE to ensure that transient failures
# will not result in data loss.
ksql.streams.producer.retries=2147483647
# Set the batch expiry to Long.MAX_VALUE to ensure that queries will not
# terminate if the underlying Kafka cluster is unavailable for a period of
# time.
ksql.streams.producer.confluent.batch.expiry.ms=9223372036854775807
# Allows more frequent retries of requests when there are failures,
@douglarek
douglarek / sample.rst
Created April 21, 2018 04:36 — forked from tatsuhiro-t/sample.rst
h2load against gRPC greeter_server

command-line:

$ h2load http://localhost:50051/helloworld.Greeter/SayHello \
      -d grpc-upload \
      -H 'te: trailers'
      -H 'content-type: application/grpc'
      -n1000000 -c100 -m100

Create grpc-upload file using following python script:

package main
import "encoding/json"
// jsonText comes from http://json.org/example.html
var jsonText = []byte(`
{
... // 此处省略, 同上
}`)
package main
import "encoding/json"
// jsonText comes from http://json.org/example.html
var jsonText = []byte(`
{
"glossary":{
"title":"example glossary",
"GlossDiv":{
@douglarek
douglarek / spacemacs-cheshe.md
Created March 23, 2018 00:30 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers
package main
import (
"log"
"time"
"golang.org/x/sys/unix"
)
func main() {
@douglarek
douglarek / main.go
Created November 13, 2017 02:23
A Tour of Go - Exercise: Web Crawler Raw
package main
import (
"fmt"
"sync"
)
// Fetcher ...
type Fetcher interface {
// Fetch returns the body of URL and