Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Some helpful functions
yell() { echo -e "${RED}FAILED> $* ${NC}" >&2; }
die() { yell "$*"; exit 1; }
try() { "$@" || die "failed executing: $*"; }
log() { echo -e "--> $*"; }
# Colors for colorizing
RED='\033[0;31m'
apiVersion: batch/v1
kind: Job
metadata:
labels:
app: hasura
hasuraService: custom
name: hasura
namespace: hasura
spec:
template:
# calculating shortest path
# All the shortest from 10.0.0.1 to 10.0.0.8 are:
10.0.0.1 -> [3001, 2001, 1002, 2007, 3008] -> 10.0.0.8 delay: 645
10.0.0.1 -> [3001, 2001, 1001, 2007, 3008] -> 10.0.0.8 delay: 726
10.0.0.1 -> [3001, 2002, 1003, 2008, 3008] -> 10.0.0.8 delay: 375
10.0.0.1 -> [3001, 2002, 1004, 2008, 3008] -> 10.0.0.8 delay: 586
# Shortest path from 10.0.0.1 to 10.0.0.8is:
10.0.0.1 -> 3001 -> 2001 -> 3002 -> 2002 -> 1003 -> 2008 -> 3008 -> 10.0.0.8 delay: 268
package main
import (
"fmt"
)
type Err struct {
m string
}
from ryu.base import app_manager
from ryu.controller import mac_to_port
from ryu.controller import ofp_event
from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofproto_v1_3
from ryu.lib.mac import haddr_to_bin
from ryu.lib.packet import packet
from ryu.lib.packet import arp
from ryu.lib.packet import ethernet
package main
import (
"encoding/csv"
"flag"
"fmt"
"io"
@scriptonist
scriptonist / Dockerfile
Created March 27, 2019 09:49
Cached Deps golang Dockerfile
FROM golang:1.12-alpine
RUN apk add -U --no-cache git ca-certificates
ADD go.mod go.sum m/ RUN cd m && go mod download
ADD . m/
RUN cd m && go install -mod=readonly ./cmd/foo
RUN go clean -modcache -cache std
ENTRYPOINT ["foo"]
package main
import (
"fmt"
"log"
"os"
gitlab "github.com/xanzy/go-gitlab"
)

Keybase proof

I hereby claim:

  • I am scriptonist on github.
  • I am scriptonist (https://keybase.io/scriptonist) on keybase.
  • I have a public key ASA4UXuxkrMWjaWfb2PdOpKpWif1HJGnf7xVqhkMDtlR9wo

To claim this, I am signing this object:

tendermint Issue-#2311 L ✔ ✘-INT
10:33:58 ▶ make test
--> Running go test
ok github.com/tendermint/tendermint/abci/client 0.228s
? github.com/tendermint/tendermint/abci/cmd/abci-cli [no test files]
ok github.com/tendermint/tendermint/abci/example 2.337s
? github.com/tendermint/tendermint/abci/example/code [no test files]
? github.com/tendermint/tendermint/abci/example/counter [no test files]
ok github.com/tendermint/tendermint/abci/example/kvstore 0.039s
? github.com/tendermint/tendermint/abci/server [no test files]