Setup
bin/kafka-topics.sh \
--zookeeper zookeeper.example.com:2181 \
--create \| $ go tool dist list | |
| android/386 | |
| android/amd64 | |
| android/arm | |
| android/arm64 | |
| darwin/386 | |
| darwin/amd64 | |
| darwin/arm | |
| darwin/arm64 | |
| dragonfly/amd64 |
| # -------- | |
| # Hardware | |
| # -------- | |
| # Opcode - operational code | |
| # Assebly mnemonic - abbreviation for an operation | |
| # Instruction Code Format (IA-32) | |
| # - Optional instruction prefix | |
| # - Operational code |
| bpf filter: "ip" | |
| (000) ldh [12] | |
| (001) jeq #0x800 jt 2 jf 3 | |
| (002) ret #96 | |
| (003) ret #0 | |
| (000) ldh [12] | |
| Load half word at packet offset 12 | |
| Offset 12 is the eth type. |
| // | |
| // This is just a collection of syscalls that are used by libsctp linux implementation. | |
| // Although it supports message-oriented workflow, it can't be wrapped into a net.PacketConn. | |
| // | |
| package main | |
| import ( | |
| "log" | |
| "syscall" |
| func structScan(rows *sql.Rows, model interface{}) error { | |
| v := reflect.ValueOf(model) | |
| if v.Kind() != reflect.Ptr { | |
| return errors.New("must pass a pointer, not a value, to StructScan destination") // @todo add new error message | |
| } | |
| v = reflect.Indirect(v) | |
| t := v.Type() | |
| cols, _ := rows.Columns() |
| package main | |
| import ( | |
| "bytes" | |
| "encoding/hex" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net" |
| package main | |
| import ( | |
| "golang.org/x/net/websocket" | |
| "log" | |
| "net/rpc/jsonrpc" | |
| ) | |
| // In a real project, these would be defined in a common file | |
| type Args struct { |
| package main | |
| import ( | |
| //"bufio" | |
| "fmt" | |
| "golang.org/x/net/icmp" | |
| "golang.org/x/net/internal/iana" | |
| "golang.org/x/net/ipv4" | |
| "log" | |
| "net" |