Skip to content

Instantly share code, notes, and snippets.

View orders.proto
message GetRequest {
repeated string ids = 1;
}
message GetResponse {
repeated Order orders = 1;
}
service Orders {
rpc Get(GetRequest) returns (GetResponse);
View test.go
package main
import (
"context"
"fmt"
"github.com/echo-health/accounts"
"github.com/lileio/pubsub"
"github.com/lileio/pubsub/kafka"
"github.com/sanity-io/litter"
@arbarlow
arbarlow / main.go
Created Mar 15, 2018
Real world cockroach benchmark
View main.go
package main
import (
"context"
"os"
"strconv"
"sync"
"time"
otgorm "github.com/echo-health/opentracing-gorm"
@arbarlow
arbarlow / export.sh
Created Feb 12, 2018
How to export k8s deployments for import into another cluster
View export.sh
kubectl get deployment -o json | jq 'del(.items[].status) | del(.items[].metadata.annotations)' > dpls.json
View main.go
// Note: the example only works with the code within the same release/branch.
package main
import (
"flag"
"os"
"path/filepath"
"strings"
"go.uber.org/zap"
View python.vim
function! neoformat#formatters#python#autoflake() abort
return {
\ 'exe': 'autoflake',
\ 'args': ['--remove-all-unused-imports', '-i'],
\ 'replace': 1,
\ }
endfunction
View gist:d43dbf685b34abca293add1c0574f59d
### Keybase proof
I hereby claim:
* I am arbarlow on github.
* I am alexrbarlow (https://keybase.io/alexrbarlow) on keybase.
* I have a public key whose fingerprint is DB50 1968 EDB9 88D2 743C 0335 DA98 6A6E 0A65 4DFB
To claim this, I am signing this object:
View keybase.md

Keybase proof

I hereby claim:

  • I am arbarlow on github.
  • I am alexrbarlow (https://keybase.io/alexrbarlow) on keybase.
  • I have a public key ASDp9m70x5POsDZmwevGOa6CYj70QlBl3lHtLo0kFjTK1Ao

To claim this, I am signing this object:

View gist:f159f0da3c158151210f
run:
goose -env=development up
go run main.go
resetdb:
dropdb riru-dev
createdb riru-dev
goose up
test:
View gist:68b41fa7f2c5aa74e0ac
@implementation InterfaceController
{
SRWebSocket *_webSocket;
}
- (void)awakeWithContext:(id)context {
[super awakeWithContext:context];
}
- (IBAction)didOpen {
You can’t perform that action at this time.