Skip to content

Instantly share code, notes, and snippets.

View munhitsu's full-sized avatar

Mateusz Łapsa-Malawski munhitsu

  • cr3.io
  • London, UK
  • 07:04 (UTC +01:00)
View GitHub Profile
@munhitsu
munhitsu / gist:8b80c8a74f01f382088f
Last active August 29, 2015 14:16
linux hdd info/benchmarking
hdparm -I /dev/sda
lshw
ioping -R /dev/sda1
# i.e. get aws ephemeral data
curl http://169.254.169.254/latest/meta-data/block-device-mapping/ephemeral0
@munhitsu
munhitsu / gist:1a95fb27fef8e6fd1beb
Last active August 29, 2015 14:15
salt hack to automatch/autogenerate role in top.sls (pillar or grain)
base:
{% for role in grains.get('roles') %}
'roles:{{ role }}':
- match: grain
- {{ role }}
{% endfor %}
{% for role in grains.get('roles') %}
'roles:{{ role }}':
- match: grain
@munhitsu
munhitsu / gist:7656b49417f7d5926652
Created February 12, 2015 11:25
OSX 10.10: pip install lxml
#fatal error: 'libxml/xmlversion.h' file not found
#test 1 (failed)
brew install libxml2
brew install libxslt
brew link libxml2 --force
brew link libxslt --force
#test 2 (passed)
STATIC_DEPS=true pip install lxml
@munhitsu
munhitsu / keybase.md
Created January 22, 2015 18:22
keybase

Keybase proof

I hereby claim:

  • I am munhitsu on github.
  • I am munhitsu (https://keybase.io/munhitsu) on keybase.
  • I have a public key whose fingerprint is 8E51 F4D3 1C2A 8D8C 07F2 7039 B8D1 BB64 D360 DABA

To claim this, I am signing this object:

@munhitsu
munhitsu / gist:156db4314264ca2959fb
Created December 26, 2014 01:14
install go on OSX
brew install go
brew install git
brew install mercurial
#go code analysis
go get golang.org/x/tools/cmd/vet
#to have offline docs using: godoc -http=:6060
go get golang.org/x/tools/cmd/godoc
@munhitsu
munhitsu / gist:87b2bc7e578ac6882765
Created November 7, 2014 12:57
see logstash threads cpu usage ('top' filter for threads)
top -Hp $(pgrep java -u logstash)
@munhitsu
munhitsu / gist:cac267db0380f6c40aca
Created October 29, 2014 13:01
boot2docker .bash_profile
boot2docker.sh() {
$(boot2docker shellinit)
}
@munhitsu
munhitsu / gist:adc23d52849e41c0dc06
Created August 12, 2014 14:00
pretty print json on command line
python -m json.tool
@munhitsu
munhitsu / gist:f79735df67fb6c9fddd2
Created August 8, 2014 17:22
reverse dns from dig
dig +noall +answer -x 8.8.8.8
dig -x 8.8.8.8
@munhitsu
munhitsu / gist:22609bf1e51ad0be9fa2
Created July 7, 2014 13:00
get elastic search cluster configuration (i.e. to check logstash protocol version)
curl -XGET localhost:9200/_nodes/_all/process?pretty