Skip to content

The Four Stages of Testing That Help Your Focus

January 04, 2023

Here’s a great blogpost which speaks out of my heart.

https://naildrivin5.com/blog/2022/08/04/the-four-stages-of-testing-that-help-your-focus.html

Original issue and comments

https://github.com/rngtng/rngtng.github.io/issues/32

Enable tab completion for your Dry::CLI

December 08, 2022

When it comes to building helpful CLIs - I’m a huge fan of Dry::CLI . Writing CLIs was never that simple and structured with a rich option/argument parser, help page, subcommands and more. Although one feature I was missing it the option for tab completion. Nothing is more convenient when magically commands or the argument values appear for selection!.

A question to the community wasn’t much helpful so I decided to build it on my own. Luckily I came across this great gem https://github.com/DannyBen/completely which already does the heavily lifting of understanding bash & zsh’s completion syntax & semantics (believe me, it’s not fun ;). So all I had to do was to extract the commands, arguments & options of the dry-cli registry, put it into the completely input data structure and generate the completion script! This all I wrapped in a simple dry-cli drop-in command and ship it as dry-cli extension gem. For more details and instruction have a look here:

https://github.com/rngtng/dry-cli-completion

Once again a huge shout out to DannyBen for completely which allows me to generate the script very conveniently.

p.s. Extension for hanami-cli is in the making :wink:

SOLVED: use AWS-VAULT with gopass as backend

January 22, 2022

A very good tool to manage multiple AWS account, especially with SSO enabled is AWS VAULT. Idea is that a session gets securely stored in a backend and (re-)used until it expires. One downside with he default macos keystore as backend is a manual password entry every time the session renews. This is not only annoying, reduces security but even aligns with my security setup. Luckily pass is supported as backend too. But for the but mature version gopass, the following setup has to be applied:

Given we have a gopass setup with two stores:

~/.password-store (default)
~/.password-store-awsvault (vault)

Then config would look like this

export AWS_VAULT_BACKEND=pass
export AWS_VAULT_PASS_CMD=gopass
export AWS_VAULT_PASS_PASSWORD_STORE_DIR=~/.password-store-awsvault
export AWS_VAULT_PASS_PREFIX=vault

This worked writing, but never reading. I didn’t even see aws-vault list calling gopass at all. Looks like the missing vault folder is a problem and aws-vault does a direct directory inspection of AWS_VAULT_PASS_PASSWORD_STORE_DIR. Fix was to hardcode the AWS_VAULT_PASS_PREFIX into a customised script (see below) and to not set the variable. Strictly spoken vault is not a prefix but the name of the store, so it maked sense:

The dedicated aws-vault-pass script:

#!/usr/bin/env bash

ARGS=( "$@" )

 ## ensure password store has 'git config commit.gpgsign false'

if [ "${ARGS[0]}" == "insert" ]
then
    # echo "- INSERT ------ ${ARGS[@]} --------" 1>&2
    gopass ${ARGS[@]/sessions/aws-vault\/sessions}
elif [ "${ARGS[0]}" == "show" ]
then
    # echo "- SHOW --------------" 1>&2
    gopass show --password aws-vault/"${ARGS[1]}"
elif [ "${ARGS[0]}" == "rm" ]
then
    # echo "- RM --------------" 1>&2
    gopass ${ARGS[@]/sessions/aws-vault\/sessions}
fi

and ensure aws-vault pics it up:

export AWS_VAULT_PASS_CMD=aws-vault-pass

Voila!

Related isssue: https://github.com/99designs/aws-vault/issues/667

Original issue and comments

https://github.com/rngtng/rngtng.github.io/issues/17

SOLVED: gpg: public key decryption failed: No pinentry

October 23, 2021

I recently updated to latest gnupg and pinentry version via homebrew, which unfortunately broke my setup. I suddenly got this error when decrypting with gpg:

...
gpg: public key decryption failed: No pinentry
gpg: decryption failed: No pinentry
...

Looking into ~/.gnupg/gpg-agent.conf this first line showed:

pinentry-program /usr/local/bin/pinentry-mac

This is right and the same what which pinentry-mac returns. So why the error? I turns out ` /usr/local/bin/pinentry-mac` is a symbol link which (apparently?) the gpg-agent doesn’t follow. So trick was to set the final path, for me that’s:

pinentry-program /usr/local/Cellar/pinentry-mac/1.1.1.1/bin/pinentry-mac

And, BOOM! It works again.

Further sources:

  • https://superuser.com/questions/1628782/gpg-signing-failed-no-pinentry

Original issue and comments

https://github.com/rngtng/rngtng.github.io/issues/16

Yeah! Ruby 3 released

December 28, 2020

OMG, the long wait has an end, ruby 3 finally released. Can’t wait to checkout Typing, IMHO one if the biggest areas where ruby <3 was lacking!

https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/

Original issue and comments

https://github.com/rngtng/rngtng.github.io/issues/12

Linux Performance Observability Tools

December 24, 2020

Great cheat sheet to observe linux performance:

IMG_5440

Source: http://www.brendangregg.com/linuxperf.html

Original issue and comments

https://github.com/rngtng/rngtng.github.io/issues/11

Launch of Samsung Pay with BankIdent

December 24, 2020

What a year! What kept me busy at work was the realization of Samsung Pay - contactless, mobile payment with a Samsung Phone. One special feature is the way how users onboard. With using BankIdent the KYC is truly seamless and doesn’t require any call agent anymore. With that it’s as quick and user friendly as never before. See the full story here:

https://www.youtube.com/watch?v=XSs1k6FoW-U

Original issue and comments

https://github.com/rngtng/rngtng.github.io/issues/9

Github Issue to Blogpost

December 23, 2020

This is a blogpost created via a github issue. With that the comfort of a WYSIWYG editing is combined with jekyll & github pages. <3

For more check out: https://github.com/yoshum/issue-to-jekyll-post

Screenshot 2020-12-23 at 22 33 25

Original issue and comments

https://github.com/rngtng/rngtng.github.io/issues/7

Oreilly Software Architecture Berlin

August 15, 2019

Cu there!

https://conferences.oreilly.com/software-architecture/sa-eu/public/schedule/speakers

REST Security Cheat Sheet

August 13, 2019

https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html

Wintergarden - building Marble Machine X

August 13, 2019

Must Follow for any music, hacking, DYI, builders:

https://www.youtube.com/watch?v=dNv8AeZfuUc

Follow the full channel: https://www.youtube.com/channel/UCcXhhVwCT6_WqjkEniejRJQ

Lego + Pinball <3

August 13, 2019

OMG: https://www.youtube.com/watch?v=Qrycqu1kTZM

How to be an Architect in a Microservice World

August 13, 2019

Great Talk and deck by Felix (@fmueller_bln)

https://speakerdeck.com/fmueller_bln/how-to-be-an-architect-in-a-microservice-world

Mirobot

August 01, 2019

Wow, Me wantz!

https://www.kickstarter.com/projects/mirobot/mirobot-6-axis-mini-industrial-robot-arm

And for my Kid: https://root.irobot.com

Hack my Car - ODB and GPS

April 23, 2019

I got myself a ‘ODB-diagnosegerät’ from China. Of course it didn’t work right away and I had to readz the internets for fixing. First I had to find a suitable driver. USB identifier was: Product ID: 0x7523 Vendor ID: 0x1a86. This looks like a CH340 / CH341 Serial / USB Chip. Luckily I found the drivers here:

http://0xcf.com/2015/03/13/chinese-arduinos-with-ch340-ch341-serial-usb-chip-on-os-x-yosemite/

VAG-COM 409.1 + Wine: https://appdb.winehq.org/objectManager.php?sClass=version&iId=33443
VAG-COM 409.1 + Win7: http://www.passatworld.com/forums/volkswagen-passat-b5-discussion/303177-vag-com-409-1-3rd-party-windows-7-64-bit.html

Kabel Fix:

GuzziDag: http://www.von-der-salierburg.de/download/GuzziDiag/

Other Software:
https://www.blafusel.de/obd/obd2_soft.html

Other devices:
http://www.t4forum.de/wbb3/board19-technik-bereich/board120-umbauten-tuning/board8-tipps-und-tricks/173924-obd-diagnosegerät-aber-welches/

 

Next: get GPS Tracker.

Hope is to find my car, once it got stolen, but so far, it was more of a hack project :). I figured, the best opensource solution you currently get is traccar.org. Here’s how to set it up and dockerize: https://www.traccar.org/docker/

Alternatives:

https://shop.autoskope.de/geraete/1/autoskope-v2-starterset