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
SELECT * FROM sometable\G | |
displays the rows like this: | |
*************************** 1. row *************************** | |
id: 1 |
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
## Kibana Discover tab show error: | |
Error: IndexPattern's configured pattern does not match any indices | |
Solved: | |
Setting index.query.default_field to _all | |
1. Close index | |
POST <index>/_close | |
2. Setting default_field | |
PUT <index>/_setting | |
{"index.query.default_field" :"_all"} |
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
# /etc/sysctl.conf | |
# set swap to 1k | |
```vm.swappiness = 1``` | |
# reload config | |
```sysctl -p /etc/sysctl.conf``` | |
# check config | |
```cat /proc/sys/vm/swappiness``` |
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
org.elasticsearch.common.netty.handler.codec.frame.TooLongFrameException: HTTP content length exceeded 104857600 bytes. | |
Update: I increased size in /etc/elasticsearch/elasticsearch.yml and it works again | |
# Set a custom allowed content length: | |
# | |
http.max_content_length: 500mb |
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
``` ld: library not found for -lssl | |
clang: error: linker command failed with exit code 1 (use -v to see invocation) | |
error: command 'clang' failed with exit status 1``` | |
Point LDFLAGS to OpenSSL's lib & include directories | |
```env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install -r environments/development.txt``` |
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
import logging | |
import sys | |
logger = logging.getLogger('kafka') | |
logger.addHandler(logging.StreamHandler(sys.stdout)) | |
logger.setLevel(logging.DEBUG) |
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
POST _reindex | |
{ | |
"source": { | |
"index":"test_fields-*", | |
"_source": { | |
"includes": ["field1", "field2"] | |
} | |
}, | |
"dest": { | |
"index": "test_fields" |
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
apiVersion: storage.k8s.io/v1 | |
kind: StorageClass | |
metadata: | |
name: standard | |
provisioner: docker.io/hostpath |
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
echo '{"a":"aa", "b":"bb"}' | jq -r -s '. | (map(keys) | add | unique) as $cols | map(. as $row | $cols | map($row[.])) as $rows | $cols, $rows[]' |
OlderNewer