This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker-py / docker-compose installed through pip fails with | |
# SSL error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) | |
# At the moment simplest solution is to use python 2.7.6 natively installed | |
$ brew uninstall python | |
# check follwoing commands if everything is ok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove all containers (only if they are not running) | |
docker rm $(docker ps -aq) | |
# remove all containers (even if they are running) | |
docker rm -f $(docker ps -aq) | |
# remove all containers and their persistent volumes | |
docker rm -fv $(docker ps -aq) | |
# remove all images from docker host |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq '.["@fields"]' ~/Downloads/app.errors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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 7859 4A7B 4DEE 7711 75EA 99A4 D4FA D361 158F 52C3 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blkid -o value -s TYPE /dev/xvdh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_db_instance" "api" { | |
identifier = "api-${var.stack}" | |
allocated_storage = 100 | |
engine = "postgres" | |
engine_version = "9.3.6" | |
instance_class = "db.m3.medium" | |
storage_encrypted = true | |
apply_immediately = false | |
name = "${var.db_name}" | |
username = "${var.db_master_username}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kworker is accounts for all kernel threads so you will also see high system CPU usage | |
In my case I've had nearly filled up BTRFS partition, so kernel was constantly searching for space. | |
tracing kernel - raw | |
``` | |
# echo l > /proc/sysrq-trigger | |
# dmesg | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ! [ -d venv ]; then | |
pyvenv venv | |
fi | |
source venv/bin/activate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# recommended ntp pool (/etc/ntp.conf) | |
server 0.amazon.pool.ntp.org iburst | |
server 1.amazon.pool.ntp.org iburst | |
server 2.amazon.pool.ntp.org iburst | |
server 3.amazon.pool.ntp.org iburst | |
ntpq | |
> peers | |
check for connection prefixed with * | |
> as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#check logs | |
curl http://localhost:9200/_cluster/health?pretty | |
curl http://localhost:9200/_cat/indices?v | |
curl http://localhost:9200/_cat/nodes?v | |
curl http://localhost:9200/_cat/shards?v | |
curl localhost:9200/_nodes/process?pretty | |