<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Enrico Stahn</title><link>https://enricostahn.com/</link><description>Recent content on Enrico Stahn</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>Enrico Stahn © 2011 - {year}</copyright><lastBuildDate>Mon, 04 Jan 2021 23:54:04 +1100</lastBuildDate><atom:link href="https://enricostahn.com/index.xml" rel="self" type="application/rss+xml"/><item><title>Export AWS Route53 Domains as CSV for Excel people</title><link>https://enricostahn.com/post/export-route53-domains-to-csv/</link><pubDate>Mon, 04 Jan 2021 23:54:04 +1100</pubDate><guid>https://enricostahn.com/post/export-route53-domains-to-csv/</guid><description>If you have a fairly large list of domains in your AWS account and want to create an easily consumable format for external departments (finance, legal, etc) then this script might be of help.
The script requires a valid AWS session with permissions to read domain details.
➡️ Available as Gist on GitHub
Installation Copy the following script into a file domains.py (skip if you want to use wget).
# Export AWS Route53 Domains to a CSV for Excel people # # Usage: # # python3 &amp;lt;(wget -q -O - https://gist.</description></item><item><title>Kubernetes Secrets in plain-text</title><link>https://enricostahn.com/post/kubernetes-secrets-in-plaintext/</link><pubDate>Mon, 04 Jan 2021 16:44:20 +1100</pubDate><guid>https://enricostahn.com/post/kubernetes-secrets-in-plaintext/</guid><description>I&amp;rsquo;ve seen some elaborate solutions to easily retrieve Kubernetes secrets in plain-text. This is what I came up with to make my life easier.
Prerequisites $ brew install jq Installation Create a file (e.g. ~/.shellfn) containing the following shell function:
function ksecret () { kubectl get secrets $@ -ojson | jq &amp;#39;{name: .metadata.name, data: .data | map_values(@base64d)}&amp;#39; } Include the file in your .zshrc, .bashrc, etc. or just via your CLI source ~/.</description></item><item><title>Guardians of the GitHub master</title><link>https://enricostahn.com/post/2016-03-27-guardians-of-the-github-master/</link><pubDate>Sun, 27 Mar 2016 00:00:00 +0000</pubDate><guid>https://enricostahn.com/post/2016-03-27-guardians-of-the-github-master/</guid><description>TL;DR: Use GitHub protected branches with required status checks.
GitHub provides a feature called protected branches to disallow direct commits into certain branches. On top you can define status checks that need to pass before you can merge anything into the protected branch.
Why is this important? It will provide a safety net for your project. I recently suggested a feature in one of the open source projects we’re using. The project maintainer liked the idea and it was fairly simple to implement.</description></item><item><title>jq for PHP</title><link>https://enricostahn.com/post/2016-03-05-jq-for-php/</link><pubDate>Sun, 27 Mar 2016 00:00:00 +0000</pubDate><guid>https://enricostahn.com/post/2016-03-05-jq-for-php/</guid><description>jq is a great tool for processing JSON on the command line. It&amp;rsquo;s easy to install (e.g. apt-get intall jq) and easy to use.
When we started writing tests for our new REST API i wanted to have an easy way to query the returned JSON responses. The end result is a small wrapper around jq.
You can find the project on GitHub
Since i have revisited our testing strategy and we moved on to using JSON Schema.</description></item><item><title>Reduce local test kitchen runtimes</title><link>https://enricostahn.com/post/2015-03-17-reduce-local-test-kitchen-runtimes/</link><pubDate>Tue, 17 Mar 2015 09:00:00 +0000</pubDate><guid>https://enricostahn.com/post/2015-03-17-reduce-local-test-kitchen-runtimes/</guid><description>At Zanui we&amp;rsquo;ve been working with Vagrant, Puppet and Chef for quite a while. We&amp;rsquo;re happy with these tools, at least most of the time.
A major discomfort is the time taken to download any kind of assets during provisioning, e.g.
Omnibus: Chef Install Apt update / packages Pip packages &amp;hellip; While this is annoying it&amp;rsquo;s usually not an issue for non-repetitive runs. These usually occur with a new team member or when a development box needs to be rebuild due to errors.</description></item><item><title>PostgreSQL - Add Primary Key to an Existing Table</title><link>https://enricostahn.com/post/2011-06-11-postgresql-add-primary-key-to-an-existing-table/</link><pubDate>Sat, 11 Jun 2011 00:00:00 +0000</pubDate><guid>https://enricostahn.com/post/2011-06-11-postgresql-add-primary-key-to-an-existing-table/</guid><description>The database we’re working on has some strange design issues and some of them are incompatible with the ORM layer we’re moving to. One of the issues is the lack of a primary key in some tables. In PostgreSQL we can solve this with the following steps:
Add a column with type integer to your table Create a sequence Update the column table with sequence values Set the necessary column properties (e.</description></item></channel></rss>