Skip to content

Instantly share code, notes, and snippets.

View XSAM's full-sized avatar

Sam Xie XSAM

  • Cisco/AppDynamics
View GitHub Profile
cd $GOPATH/src
mkdir -p github.com/vektra && cd github.com/vektra && git clone https://github.com/corentone/mockery.git
cd mockery && git checkout in-place-differentfolder && make install
# Test
cd $GOPATH/src
mkdir JyBP
git clone https://github.com/JyBP/keeptree.git && cd keeptree
mockery -all -keeptree -output ./cmd/mocks -dir ./
@XSAM
XSAM / dump_socket.sh
Created March 15, 2018 08:16 — forked from jhass/dump_socket.sh
Capture unix socket to pcap file with socat and tshark
#!/bin/bash
# Parameters
socket="/run/foo.sock"
dump="/tmp/capture.pcap"
# Extract repetition
port=9876
source_socket="$(dirname "${socket}")/$(basename "${socket}").orig"