Skip to content

Instantly share code, notes, and snippets.

View geoand's full-sized avatar

Georgios Andrianakis geoand

View GitHub Profile
@geoand
geoand / gist:79a44ad2128059349ab4
Created November 18, 2015 15:43
Tshark capture local traffic outgoing TCP or UDP traffic with host resolution
tshark -c 50 -NnNC -E header=y -Tfields -e col.Protocol -e ip.dst -e ip.dst_host -e tcp.dstport -e udp.dstport -f "host $(hostname --ip-address) and (tcp or udp) and not (port 53)"
@geoand
geoand / gist:12f1cc17f802f5e6b263
Last active November 10, 2015 16:36
Groovy - Guava classical set operations
@Grapes(
@Grab(group='com.google.guava', module='guava', version='18.0')
)
import static com.google.common.collect.Sets.*
def first = ['a', 'b', 'c'] as Set
def second = ['b', 'c', 'd', 'e'] as Set