Skip to content

Instantly share code, notes, and snippets.

View lukasz-pyrzyk's full-sized avatar
🏠
Working from home

Łukasz Pyrzyk lukasz-pyrzyk

🏠
Working from home
View GitHub Profile
@jclosure
jclosure / contains_key_or_empty.txt
Created July 3, 2017 05:33
Kibana Painless scripted field checks if field exists or is empty and returns default, otherwise value
if (!doc.containsKey('myfield') || doc['myfield'].empty) { return "unavailable" } else { return doc['myfield'].value }
@kujiy
kujiy / git-bash.exe-args
Last active April 20, 2023 13:55
How to open a specific folder with git-bash.exe from a command line(shell)
With argument
"C:\Program Files\Git\git-bash.exe" "--cd=%1"
Direct
"C:\Program Files\Git\git-bash.exe" "--cd="C:\YOUR\FOLDER\"
@ekristen
ekristen / check_docker_container.sh
Last active January 16, 2024 16:15
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Depending on your docker configuration, root might be required. If your nrpe user has rights
# to talk to the docker daemon, then root is not required. This is why root privileges are not