brew install gnupg
brew install pinentry-mac
gpg --version
gpg (GnuPG) 2.1.20
#!/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}" |
#!/bin/bash | |
######################################################################### | |
# # | |
# # | |
# NATO String converter # | |
# # | |
# Description: converts string (first parameter given) # | |
# to NATO phonetics-alphabet # | |
# # |
#!/bin/bash | |
# | |
# A quickndirty bash-utility to generate REST-documentation from sourcecode comments. | |
# (initially aimed at php-files, but js should also work) | |
# Basically its a c-style comment -> markdown -> html converter | |
# Dependancies: | |
# - awk | |
# - sed | |
# - bash | |
# - php |
# 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 |
{ | |
"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, |