Skip to content

Instantly share code, notes, and snippets.

@artbikes
artbikes / _CLI_Elasticsearch_Analysis.md
Created July 29, 2021 21:23 — forked from dcode/_CLI_Elasticsearch_Analysis.md
Analyze Elasticsearch on command line using HTTPie and jq

README

Especially when developing new query logic, it's helpful to query elasticsearch from the command line. If your Elasticsearch cluster uses SAML authentication or some other SSO, it's not simple or sometimes not even possible to query using curl directly. I wrote an auth plugin for HTTPie that should greatly simplify this process if you have rights to create API keys via the Kibana dev console (talk to your administrator and see the link below).

This process is also super handy for shell scripting because you can provide fine-grained limits of what your API key can do, making their use much safer and easier to manage than embedding native realm username/passwords.

@artbikes
artbikes / rubix.py
Created October 14, 2021 18:32 — forked from fogleman/rubix.py
Simple 2x2x2 Rubik's Cube Solver in Python
import sys
# -------
# | 16 17 |
# | Y |
# | 18 19 |
# ------- ------- ------- -------
# | 12 13 | 00 01 | 04 05 | 08 09 |
# | X | Z | X | Z |
# | 14 15 | 02 03 | 06 07 | 10 11 |
@artbikes
artbikes / Makefile.version
Created March 28, 2022 16:48 — forked from grihabor/Makefile.version
Makefile to use for incremental semantic versioning
MAKE := make --no-print-directory
DESCRIBE := $(shell git describe --match "v*" --always --tags)
DESCRIBE_PARTS := $(subst -, ,$(DESCRIBE))
VERSION_TAG := $(word 1,$(DESCRIBE_PARTS))
COMMITS_SINCE_TAG := $(word 2,$(DESCRIBE_PARTS))
VERSION := $(subst v,,$(VERSION_TAG))
VERSION_PARTS := $(subst ., ,$(VERSION))
@artbikes
artbikes / debug-biff-route.md
Created October 9, 2024 15:50 — forked from jacobobryant/debug-biff-route.md
Example of debugging an http endpoint (or function in general) in Biff (or Clojure in general)