brew install gnupg
brew install pinentry-mac
gpg --version
gpg (GnuPG) 2.1.20
#!/bin/bash | |
######################################################################### | |
# # | |
# # | |
# NATO String converter # | |
# # | |
# Description: converts string (first parameter given) # | |
# to NATO phonetics-alphabet # | |
# # |
# Heavily depends on: | |
# libqrencode (fukuchi.org/works/qrencode/) | |
# paperkey (jabberwocky.com/software/paperkey/) | |
# zbar (zbar.sourceforge.net) | |
# Producing the QR codes: | |
# Split over 4 codes to ensure the data per image is not too large. | |
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp | |
split temp -n 4 IMG | |
for f in IMG*; do cat $f | qrencode -o $f.png; done |
#!/bin/bash | |
file="$1" | |
region="eu-west-1" | |
key_id="YOUR-AWS-KEY-ID" | |
key_secret="YOUR-AWS-KEY-SECRET" | |
path="some-directory/$file" | |
bucket="s3-bucket-name" | |
content_type="application/octet-stream" | |
date="$(LC_ALL=C date -u +"%a, %d %b %Y %X %z")" |
[ -r ~/path/to/konsole-tabs.sh ] && | |
. ~/path/to/konsole-tabs.sh | |
# Run multiple commands in individual tabs | |
commands_in_tabs() { | |
local cmd profile clear_first clear_cmd="" exit_new_tabs_afterwards exit_current_tab_afterwards title i | |
local sessions=() | |
: "${profile:="$(qdbus org.kde.konsole /Konsole defaultProfile)"}" | |
: "${clear_first:=1}" |
{ | |
"path":"/home/foo/icons/", | |
"domain":"example.com", | |
"icons":[ | |
{"host":"aaa.example.com", "icon":"red.png"}, | |
{"host":"bbb.example.com", "icon":"green.png"}, | |
{"host":"ccc.example.com", "icon":"yellow.png"}, | |
{"host":"ddd.example.com", "icon":"orange.png"}, | |
{"host":"eee.example.com", "icon":"blue.png"}, | |
{"host":"fff.example.com", "icon":"cyan.png"}, |
#!/usr/bin/env ruby | |
require 'json' | |
require 'Simplenote' | |
class ZimDirectory < Hash | |
class ZimException < Exception | |
end | |
attr_reader :dir |
This is an example of using ELK to parse and view collectd data.
Caveat - I haven't fully tested this mapping yet, it doesn't take into account any other fields that may be added with other collectd plugins, just the ones I have specified below.
{ | |
"title": "Collectd: Blackbox", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"query": "plugin:\"load\"", | |
"alias": "Load", | |
"color": "#7EB26D", | |
"id": 0, |
This script can be used to feed collectd with cpu and memory usage statistics for running docker containers using the collectd exec
plugin.
This script will report the used and cached memory as well as the user and system cpu usage by inspecting the appropriate cgroup stat file for each running container.
This script is intented to be executed by collectd on a host with running docker containers. To use, simply configure the exec
plugin in collectd to execute the collectd-docker.sh
script. You may need to adjust the script to match your particulars, such as the mount location for cgroup.