Skip to content

Instantly share code, notes, and snippets.

@liukun
liukun / istatd.cfg
Last active August 29, 2015 14:00
iStatD configurations
# https://github.com/imvu-open/istatd/wiki/Configuring-istatd
--store /mnt/proC/istatd/store
--settings /mnt/proC/istatd/settings
--pid-file /mnt/proC/istatd/istatd.pid
--log-file /home/liukun/log/istatd.log
--log-level 2
--num-files 50000
--local-stats localhost
--thread-count 3
--stat-port 18001
@liukun
liukun / @LogStash
Last active August 29, 2015 14:00
Setup LogStash on test server
.
@liukun
liukun / getgist
Last active August 29, 2015 14:00 — forked from bmihaylov/getgist
#!/usr/bin/env bash
if [[ "$1" =~ ^[0-9]+ ]]; then
curl -L "http://gist.github.com/$1/download" | tar zx --strip-components 1
exit 0
fi
curl -L "$1/download" | tar zx --strip-components 1
/home/liukun/log/*.log {
daily
missingok
rotate 2
notifempty
copytruncate
}
local char_to_hex = function(c)
return string.format("%%%02X", string.byte(c))
end
local function urlencode(url)
if url == nil then
return
end
url = url:gsub("\n", "\r\n")
url = url:gsub("([^%w ])", char_to_hex)

Keybase proof

I hereby claim:

  • I am liukun on github.
  • I am liukun (https://keybase.io/liukun) on keybase.
  • I have a public key ASBPe78wXkMNwdFmIT1OSTUvkl5idgh6YckMmii0IKyTEwo

To claim this, I am signing this object: