Skip to content

Instantly share code, notes, and snippets.

@slok
slok / pprof.md
Last active July 1, 2024 11:41
Go pprof cheat sheet

Enable profiling

Default http server

import (
    _ "net/http/pprof"
    "net/http"
)
@asukakenji
asukakenji / 0-go-os-arch.md
Last active July 18, 2024 06:42
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@uffsalot
uffsalot / collectd.conf
Created July 16, 2016 12:23
sample collectd.conf
FQDNLookup true
Interval 120
LoadPlugin syslog
<Plugin syslog>
LogLevel info
</Plugin>
LoadPlugin disk
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten