Skip to content

Instantly share code, notes, and snippets.

View bcap's full-sized avatar

Bruno Penteado bcap

  • VTEX, ex Meta
  • London, United Kingdom
View GitHub Profile
@metafeather
metafeather / main.go
Created April 27, 2017 13:06
Get goroutine id for debugging
# ref: https://play.golang.org/p/OeEmT_CXyO
package main
import (
"fmt"
"runtime"
"strconv"
"strings"
"sync"
)
#!/bin/sh
#
# Use ipfw to throttle bandwidth.
# usage:
# ./throttle.sh # Throttle at default (60KB/s)
# ./throttle.sh 5 # Throttle at custom speed (5KB/s)
# ./throttle.sh off # Turn throttling off
# flush rules
ipfw del pipe 1