Skip to content

Instantly share code, notes, and snippets.

View stefanhorning's full-sized avatar
⌨️
Coding

Stefan Horning stefanhorning

⌨️
Coding
View GitHub Profile
@stefanhorning
stefanhorning / graylog_snaps_index_finder.rb
Created September 30, 2021 13:15
Graylog lastest index in ES snapshots finder
#!/usr/bin/env ruby
require 'json'
require 'time'
filename = 'es_snapshots_out.json'
puts "Reading snapshot info from file: #{filename}"
snapshots = JSON.parse(File.read(filename))['snapshots']

Clients (aka Software) that can open KeePass files

KeePass is a file format standard for storing a Password Management Database which can be used with a wide variete of Password magers that support the format. There is Desktop, Mobile and Web KeePass client software.

By now there is two keepass file formats, v1 and v2. They are not compatible to each other, but some clients support both versions. Newer apps usually prefer the newer v2 format.

Desktop: Cross-Platform (Linux/Windows/MacOs)

@stefanhorning
stefanhorning / aspera.conf.sample
Last active May 10, 2019 13:03
Aspera High Speed server sample config aspera.conf
<?xml version="1.0" encoding="UTF-8"?>
<!-- Sample config file with ducumented default values for the Aspera High Speeds Transfer Server (HSTS) product -->
<!-- Documented here https://download.asperasoft.com/download/docs/entsrv/3.9.1/es_admin_linux/webhelp/index.html#dita/intro.html -->
<!-- To modify this file also the `asconfigurator -x` command can be used. After making modifications verify file validity with `/opt/aspera/bin/asuserdata -v` -->
<CONF version="2">
<!-- Config also takes a <WEB /> section to configure the Web UI, see https://download.asperasoft.com/download/docs/entsrv/3.9.1/es_admin_linux/webhelp/index.html#dita/web_ui_configuration.html -->
<!-- Aspera Transfer Server Configuration (some sort of control instance for managing the Aspera DB) -->
@stefanhorning
stefanhorning / iam_module_test.yml
Last active December 20, 2019 14:55
Ansible IAM module test play
# Play to test IAM module return values
- name: Play testing return values of the iam module
hosts: localhost
vars:
iam_user_name: test-ansible-iam-module
tasks:
- name: Create user initially
@stefanhorning
stefanhorning / ansible-codepipeline-play.yml
Created October 17, 2018 12:10
Ansible play to test aws_codepipeline module
- name: Playbook to test CodePipeline module
hosts: localhost
vars:
aws_region: us-east-1
codebuild_iam_role_arn: 'arn:aws:iam::XXX:role/codepipeline-service-role'
tasks:
- name: CodePipeline project task
aws_codepipeline:
name: test-ansible
@stefanhorning
stefanhorning / ansible-codebuild-play.yml
Created October 17, 2018 09:21
Ansible aws_codebuild module test play
- name: Playbook to test codebuild module
hosts: localhost
vars:
aws_region: us-east-1
aws_account_id: 123123123
codebuild_iam_role_name: codebuild-service-role
tasks:
- name: CodeBuild project task
aws_codebuild:
name: test-ansible
@stefanhorning
stefanhorning / ruby-rbenv-setup.sh
Last active October 11, 2018 20:27
Setup ruby from scratch using rbenv and ruby-install as a plugin thereof and the necessary .bashrc from my .dotfiles repo
#!/bin/bash
# Rbenv and ruby-build setup script.
# Inspired by https://gorails.com/setup/ubuntu/16.04
# Install ruby native dependencies (tailored for Ubuntu 16.04 or newer)
sudo apt-get install git curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
# [optional] Sets up .bashrc with necessary additions for rbenv and ruby-build (ONLY DO ON FRESH SYSTEM)
@stefanhorning
stefanhorning / bike-sharing-berlin.md
Last active May 17, 2018 21:25
Bike Sharing Providers in Berlin

Bike-Sharing Anbieter in Berlin

Lidl Bike

¹bzw. 1€ wenn an Station abgegeben wird)

@stefanhorning
stefanhorning / SSH-Troubleshoot.md
Last active February 10, 2017 17:02
Troubleshoot SSH logins

Permission denied (publickey).

Output example:

Permission denied (publickey).
Connection to my-server.com closed.

Check your loaded keys with ssh-add -l.

If necessary key needed for that server is not in the list add it with ssh-add path/to/key.

@stefanhorning
stefanhorning / aws-iam-allow-acces-to-own-settings.json
Last active November 18, 2016 11:40
AWS IAM policy document that allows IAM users to view and change their own settings (w/o allowing chaning others)
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:*"
],
"Resource": [
"arn:aws:iam:::mfa/${aws:username}",