Skip to content

Instantly share code, notes, and snippets.

@ioc32
ioc32 / gist:7571109
Created November 20, 2013 21:10
unbound-control stats
root@monet:~# unbound-control stats_noreset
thread0.num.queries=884
thread0.num.cachehits=9
thread0.num.cachemiss=875
thread0.num.prefetch=0
thread0.num.recursivereplies=875
thread0.requestlist.avg=182.583
thread0.requestlist.max=464
thread0.requestlist.overwritten=0
thread0.requestlist.exceeded=0
@ioc32
ioc32 / rsyslog-vagrant.test
Last active August 29, 2015 14:02
rsyslog 8.2 and elasticsearch 1.2
[root@s2 etc]# cat rsyslog.conf
#### GLOBAL DIRECTIVES ####
# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
$WorkDirectory /var/lib/rsyslog
$IncludeConfig /etc/rsyslog.d/*.conf
[root@s2 etc]# cat rsyslog.d/system-logs.conf
#### MODULES ####
@ioc32
ioc32 / getdns-python-bindings.broken.log
Created August 25, 2014 10:44
getdns-python-bindings fails to compile
(master)iortiz@rigel:~/Code/git/getdns-python-bindings
$ python setup.py build_ext --inplace
running build_ext
building 'getdns' extension
creating build
creating build/temp.macosx-10.9-intel-2.7
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c getdns.c -o build/temp.macosx-10.9-intel-2.7/getdns.o
getdns.c:242:82: warning: implicit conversion loses integer precision: 'getdns_transaction_t'
(aka 'unsigned long long') to 'int' [-Wshorten-64-to-32]
blob->type, blob->extensions, blob->userarg, blob->tid,
@ioc32
ioc32 / getdns-python-bindings.log
Created August 25, 2014 10:44
getdns-python-bindings compiles
(fix-compilation)iortiz@rigel:~/Code/git/getdns-python-bindings
$ python setup.py build_ext --inplace
running build_ext
building 'getdns' extension
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c getdns.c -o build/temp.macosx-10.9-intel-2.7/getdns.o
getdns.c:244:82: warning: implicit conversion loses integer precision: 'getdns_transaction_t'
(aka 'unsigned long long') to 'int' [-Wshorten-64-to-32]
blob->type, blob->extensions, blob->userarg, blob->tid,
~~~~~~^~~
getdns.c:405:33: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
@ioc32
ioc32 / heka.sample.toml
Created September 2, 2014 15:00
heka TOML samples
[vagrant@hekad heka]$ cat global.toml
[hekad]
maxprocs = 1
pid_file = "/var/run/hekad.pid"
# heka needs rw
base_dir = "/var/cache/hekad"
# heka needs ro
share_dir = "/usr/share/heka"
[DashboardOutput]
@ioc32
ioc32 / es-json-logging.yml
Last active August 29, 2015 14:06
elasticsearch JSON logging
# See:
# - https://github.com/logstash/log4j-jsonevent-layout
# - http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html#logging
# - http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_logging.html
es.logger.level: INFO
rootLogger: ${es.logger.level}, console, json
logger:
# log action execution errors for easier debugging
action: DEBUG
@ioc32
ioc32 / gist:9e64a9948333fd9b126f
Created January 6, 2015 20:08
Heka issue1235
[hekad]
maxprocs = 2
base_dir = "/tmp/cache"
pid_file = "/tmp/hekad.pid"
share_dir = "/usr/share/heka"
[log1]
type = "LogstreamerInput"
log_directory = "/var/log/"
file_match = 'yum\.log'
@ioc32
ioc32 / gist:7a4f1965f54c26e99df4
Created April 18, 2015 10:25
A todo jazz - show list
iortiz@monet:~/Code/git/cifu-archive
$ ls -1 /mnt/storage/cifu/atj-*
/mnt/storage/cifu/atj-2008-08-28-A todo jazz - 280808.mp3
/mnt/storage/cifu/atj-2008-09-06-Primera hora - 060908.mp3
/mnt/storage/cifu/atj-2008-09-06-Segunda hora - 060908.mp3
/mnt/storage/cifu/atj-2008-09-13-Primera hora - 130908.mp3
/mnt/storage/cifu/atj-2008-09-13-Segunda hora - 130908.mp3
/mnt/storage/cifu/atj-2008-09-20-Primera hora - 200908.mp3
/mnt/storage/cifu/atj-2008-09-20-Segunda hora - 200908.mp3
/mnt/storage/cifu/atj-2008-09-27-Primera hora - 270908.mp3
@ioc32
ioc32 / get_apu_temp.sh
Last active August 29, 2015 14:19
get_apu_temp.sh
# cat get_apu_temp.sh
#!/bin/sh
date=$(date "+%Y-%m-%dT%H:%M:%S")
temp=$(sysctl hw.sensors.km0.temp0 | sed 's/.*=\([0-9\.]*\) degC/\1/')
ints=$(vmstat -w 1 -c 2 | awk 'END {print $14}')
echo $date,$temp,$ints >> /root/apu-temperatures.csv
# crontab -l | grep get_apu_temp
* * * * * /bin/sh /root/get_apu_temp.sh
@ioc32
ioc32 / gist:9f33607524714d1da66b
Created May 10, 2015 14:02
ASN, Holder names
This file has been truncated, but you can view the full file.
AS0 -Reserved AS-,ZZ
AS1 LVLT-1 - Level 3 Communications, Inc.,US
AS2 UDEL-DCN - University of Delaware,US
AS3 MIT-GATEWAYS - Massachusetts Institute of Technology,US
AS4 ISI-AS - University of Southern California,US
AS5 SYMBOLICS - Symbolics, Inc.,US
AS6 BULL-HN - Bull HN Information Systems Inc.,US
AS7 UK Defence Research Agency,GB
AS8 RICE-AS - Rice University,US
AS9 CMU-ROUTER - Carnegie Mellon University,US