Skip to content

Instantly share code, notes, and snippets.

@truthbk
truthbk / gopacket-static-link.diff
Created December 28, 2015 10:21
Patch to build gopacket such that it links statically with libpcap
@truthbk
truthbk / libpcap.license
Last active December 29, 2015 10:47
Libpcap 3-Clause BSD License
License: BSD
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in

Keybase proof

I hereby claim:

  • I am truthbk on github.
  • I am truthbk (https://keybase.io/truthbk) on keybase.
  • I have a public key ASCw0cTZNeZOIH34LK15t0gqUTL-yKKVq4fq9H8_3R9HJQo

To claim this, I am signing this object:

Various copyrights apply to this package, listed in various separate
parts below. Please make sure that you read all the parts.
---- Part 1: CMU/UCD copyright notice: (BSD like) -----
Copyright 1989, 1991, 1992 by Carnegie Mellon University
Derivative Work - 1996, 1998-2000
Copyright 1996, 1998-2000 The Regents of the University of California
@truthbk
truthbk / main.go
Created August 9, 2018 11:40
Random dogstatsd sampler
package main
import (
"fmt"
"math/rand"
"os"
"os/signal"
"time"
"github.com/DataDog/datadog-go/statsd"
#!/bin/sh
# This script will attempt to install the contents of
# yum_bundle.tar contains yum and its dependent packages.
# It checks if any of the package from yum_bundle is already installed and then
# installs the packages accordingly.
# flag is used to identify if same, lower or higher version of package is already
# installed from yum_bundle.
# flag=1 Exact version installed
# flag=2 Higher version already installed
@truthbk
truthbk / winrm_meminc.ps1
Last active November 19, 2019 21:05
winrm_meminc.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Invoke-Command -ScriptBlock {winrm set winrm/config/winrs `@`{MaxMemoryPerShellMB=`"2048`"`}}
Invoke-Command -ScriptBlock {winrm set winrm/config/winrs `@`{MaxProcessesPerShell =`"200`"`}}
choco install kb976932
choco install kb2670838