Skip to content

Instantly share code, notes, and snippets.

View goors's full-sized avatar

Nikola goors

  • Zlatibor
  • 01:09 (UTC +02:00)
View GitHub Profile
@goors
goors / elasticsearch-bulk-index-from-json-hits.md
Created March 4, 2024 13:23 — forked from renshuki/elasticsearch-bulk-index-from-json-hits.md
Elasticsearch - Bulk index from a JSON file hits (with jq)
cat file.json | jq -c '.hits.hits[] | { index: {_index:._index, _type:._type, _id:._id}}, ._source' | curl -XPOST -H "Content-Type: application/x-ndjson" localhost:9200/_bulk --data-binary @- | jq .
@goors
goors / mysql_forward.sh
Created March 4, 2021 16:47 — forked from eresende/mysql_forward.sh
Forward MySQL port to another IP with IPTABLES
iptables -t nat -A PREROUTING -p tcp --dport 3306 -j DNAT --to 10.0.4.172:3306
iptables -A FORWARD -p tcp -d 10.0.4.172 --dport 3306 -j ACCEPT
iptables -t nat -A POSTROUTING -j MASQUERADE
@goors
goors / .procmailrc
Created June 23, 2020 00:43 — forked from leifdenby/.procmailrc
Forwarding emails to a Python script with procmail
:0Wc:
| env python mail_receiver.py