LLL: Analysis Paralysis

What is Analysis Paralysis? Analysis paralysis is the state of overthinking a decision to the point where no action is taken. It often occurs when one feels the need to make the perfect choice, resulting in an overwhelming fear of making the wrong decision. Why is Analysis Paralysis Important? Impact on Decision-Making Analysis paralysis can delay decisions, reduce productivity, and lead to missed opportunities. The fear of making an imperfect decision often results in no decision at all, which can be more harmful than making a less-than-perfect choice....

June 2, 2024 · Benedikt Lang

LLL: Parkinson’s Law

Exploring Parkinson’s Law: A Lifelong Learner’s Insight As part of my lifelong learning journey, I uncover and understand new concepts each day. Today, I’m delving into a fascinating principle known as Parkinson’s Law. This concept provides valuable insights into time management and productivity, making it a crucial topic for anyone committed to continuous improvement and efficiency. What is Parkinson’s Law? Parkinson’s Law was articulated by Cyril Northcote Parkinson, a British naval historian, in a 1955 essay for The Economist....

May 31, 2024 · Benedikt Lang

LLL: The Peter Priciple

Understanding the Peter Principle As part of my lifelong learning journey, I aim to uncover and understand new concepts each day. Today, I’m diving into a fascinating and somewhat humorous principle known as the Peter Principle. This principle offers critical insights into organizational dynamics and personal career growth, making it an essential topic for anyone invested in continuous learning and professional development. What is the Peter Principle? The Peter Principle was formulated by Dr....

May 28, 2024 · Benedikt Lang

LLL: Exploring Lateral Thinking

Exploring Lateral Thinking: A New Approach to Problem-Solving As a cloud engineer and architect, I’m always looking for ways to enhance my problem-solving skills. To keep my mind sharp and continuously learn, I use OpenAI’s ChatGPT to introduce me to a new concept every day. Today, let’s delve into the intriguing world of lateral thinking. What is Lateral Thinking? Lateral thinking, a term coined by Edward de Bono in 1967, refers to a problem-solving approach that involves looking at challenges from new and unconventional angles....

May 27, 2024 · Benedikt Lang

K3s - NFS share

These are my personal notes while performing the installation. Instructions might be incomplete, dangerous or wrong. Problem: Local storage for K3s installation in VM Cleanest solution: Mount NFS on host and use hostpath on pod Also: Would be good to export all k3s state, maybe backups are better than full nfs export Dom0 and K3s must communicate through link local network dom0$ cat libvirt-net-private.xml <network> <name>private</name> <bridge name='virbr1' stp='on' delay='0'/> <ip address='169....

April 28, 2019 · Benedikt Lang

TLS Client Auth

TLS Client Authentication for webservers Instead of using basic auth for access restriction on websites with a predefined user base you can use TLS Client authentication. This option requires the server to validate clients certificate while establishing a TLS connection. The usage of the known server-side TLS remains untouched, therefore you can use ACME provided certificates for your server and still validate client certificates you provided. The procedure works like this: You create a CA, which is used to create certificates for your clients....

March 4, 2018 · Benedikt Lang

Remove blurry console fonts - Hinting

Small problems, especially regarding fonts, can drive you crazy over time. Hinting is such a thing, i was troubleshooting many hours since i could not state what’s wrong. The font simply felt wrong, really hurt my eye. After comparing the font with exact same settings with my old gentoo installation and taking many screenshots i found the problem: Hinting. By default, there’s a config /etc/fonts/conf.d/10-hinting-slight.conf on arch and many other distros....

August 29, 2016 · Benedikt Lang

Disk backup using netcat and pv

Short summary on how to fully backup a disk over network using netcat and pv. This solution is much faster than nfs or sftp but unencrypted. I experienced 112MB/s on my gigabit lan. Server netcat -l -w 2 1111 | pv -b > backup.img Client Use the -s flag to provide an estimated size for pv to calculate ETA. pv -s250G -cN "sda" /dev/sda | nc 10.10.10.1 1111

May 3, 2016 · Benedikt Lang

Basic python environment

A short summary on how to setup a good python environment for beginners. vim support See Excellent blog post. PEP8 Checking PEP8 is the style guide for python. You can enable style checking in vim: First install flake8 pip install flake8 Then install vim-flake8 To check syntax on file save, add this to your vimrc: autocmd BufWritePost *.py call Flake8() Virtualenv Virtualenv keeps your python package path clean only including project requirements....

April 14, 2016 · Benedikt Lang

Short introduction to vlans (IEEE802.1Q)

VLans (Virtual local area network) provide separation of ethernet communication on a single physical network. Basically you can have multiple subnets, without access to each other on the same cable. This standard is called IEEE802.1Q is supported by most modern switches (more below) and operating systems like linux or windows. How separation works An 802.1Q header is added to ethernet frames, which identifies the vlan of the specific packet. That allows to separate frames from each other using a managed switch....

February 28, 2016 · Benedikt Lang

Create Windows 7 bootable installation usb

This is how you create a bootable usb to install Windows 7 (NON EFI): Attention, make sure you understand every step before executing it. If not used correctly can result in fatal dataloss. Assumptions: USB stick with ~4GB: /dev/sdb (change device according to your setup, don’t overwrite your second harddisk!) Get the iso Visit http://mirror.corenoc.de/digitalrivercontent.net/ and download one via torrent Wipe the device If you’re like me and tried to dd the iso to your usb stick or created multiple partition tables in this process, better wipe your stick....

February 25, 2016 · Benedikt Lang

Raspberry PI VPN Router

In this little tutorial i explain how to build a raspberry pi vpn router. This raspi will be equiped with an additional ethernet adapter and work as a router between your pc and your home lan or between portions of your local network. The raspi will use NAT to connect devices connected to eth1 to your ISP or a choice of multiple vpns. What was important for me is to ensure that your device only passes the selected output channel. If the vpn breaks down, no internet even if the second vpn or your isps connection still works. No auto switch to your isp. Requirements: USB Ethernet adapter Linux skills Rasperry pi with fresh raspbian ...

January 13, 2016 · Benedikt Lang

Migrate etcd 0.4.x to etcd 2.2

I updated my ’never update’ coreos server and what could i tell you, it was a bad idea (update often or never). Disclaimer: If you have a running 0.4.x instance and want to update, this might not be the best guide for you. I made the mistake to update before backing up etcd, this guide is about recovering all your data from a “.ss” file, found in the old etcd data directory (found at /var/lib/etcd/). ...

November 18, 2015 · Benedikt Lang

Use xhandler inside goji router

I found it a good way to test multiple golang http routers using xhandler as a uniform handler type. That way you already use a proper handler with the ability to transport request/route based values without binding to a specific framework. ...

November 12, 2015 · Benedikt Lang

Yubikey FIDO U2F on Gentoo

I just got the github promo Yubikey with U2F. It wasn’t as plug and play as i thought so i will share my experience. ...

October 25, 2015 · Benedikt Lang

German umlaute on us keyboard

The use of an english keyboard layout is a good choice for every programmer since all brackets and important symbols are far better reachable than on the german keyboard layout, but there’s one problem, the umlaute. ...

October 16, 2015 · Benedikt Lang

Raspberry Pi and Logitech C920 Webcam live streaming using rtmp

The Logitech C920 Webcam is ideal for streaming since it provides a h264 output out-of-the box. Especially if your streaming box has limited computing power like a raspberry pi. Most people use motion or other mjpeg webcam solutions, but i will show how to get 15-20 FPS live stream at 720p out of the raspberry pi model b. This solution also includes the ability to use jwplayer to watch your stream using most webbrowsers. These instructions may not be complete and only show you the way to go. ...

October 10, 2015 · Benedikt Lang

Private git repositories with s3 backup

Github is a bit too expensive to offload my private repositories which i’m not currently working on. It’s quite easy to create you own git server and setup a backup to s3. Here is how: ...

October 6, 2015 · Benedikt Lang

Deploy golang binaries using wercker, glide and gox

A short example on how to deploy golang binaries using wercker. It also uses dependency managment via glide and cross compiles your code for many platforms. At the end you can push a git tag, click deploy and a github release is created containing all your cross compiled binaries. Have a look at the release of my project ...

September 14, 2015 · Benedikt Lang

Pushover notification for long running tasks

Last day i had to wipe the disk of my vserver and since this can take a long time, i needed a way to get notified when the process is done. I need an easy notification mechanism from any shell connected to the internet. The solution i found was the notification api of pushover.net. It provides a very simple api to create Push-Notifications for Android or IOS. It’s simple: Create an account Download Android/iPhone App Register an app to get an api token Now how to get notified if the disk shredding is complete?...

September 14, 2015 · Benedikt Lang

Docker tooling - Jekyll

As part of an upcoming docker tooling series we start with Jekyll, a static website generator used for blogs and websites. Jekyll is also supported by Github pages, so check it out if you’re not familiar with it. Docker containers are ideal if you need an environment to compile sources without installing the actual compiler on your machine. Especially interesting in case of ruby since setting up a proper ruby environment is hard (and annoying)....

April 19, 2015 · Benedikt Lang

Docker tooling - Latex

Latex is a known typesetting system. Docker containers are ideal if you need an environment to compile sources without installing the actual compiler on your machine. A full latex installation uses quite a lot of space and containerizing the whole installation has many pros. Latex image To install your latex image, there’s nothing else to do than to pull blang/latex. docker pull blang/latex Of course you can build it by yourself, have a look at the Dockerfile....

April 19, 2015 · Benedikt Lang

golang-alpine - Build golang binaries for alpine linux

Since alpine linux and therefor gliderlabs/alpine docker containers use musl instead of gnu libc your golang binaries will not work inside alpine. There are two ways you can fix this: Static linking CGO_ENABLED=0 go build -a -installsuffix cgo Use this docker image Use this docker image to build your binary, check the usage below. Using gliderlabs/alpine it is possible to create an image similiar to golang with only 204MB. You can pull it from docker hub: docker pull blang/golang-alpine...

April 19, 2015 · Benedikt Lang

How to build the smallest docker containers

FROM ubuntu ... Today most docker containers are based on ubuntu or debian images, which result in quite a big amount of data per container. Most included data is never needed by the containing application. docker images gives a good overview about the sizes of images. Especially containers containing small amounts of data like tooling scripts profit from a smaller base image. There are a couple of ways to get a smaller base image, which are shown below....

April 18, 2015 · Benedikt Lang

Resize luks partition under lvm

A simple collection of commands used to resize a partition encrypted by luks and resize lvm volumes on top of that. Make sure you understand everything before using any command below, this might destroy all your data! Umount all volumes, deactivate lvm lvchange -a n vg0 and close luks. Delete partition you want to expand, recreate partition with same start and different ending. Extend luks Now, here are some steps to follow...

March 19, 2015 · Benedikt Lang

ArmA Server RPT Log shipping to elasticsearch using heka

Arma RPT Logfiles are essential to solve many mysteries around the arma game series. Since i’m hosting multiple arma servers, log management is quite horrible. Especially if others need informations what went wrong and there is no way to give them access. Previously this problem was solved by FTP access to the log directory, which was neither user friendly nor free of trouble (file locking). I thought the best way to solve this whole problem on our new servers is proper logshipping....

March 17, 2015 · Benedikt Lang

ArmA3 Server RPT - Change directory of logs

By default, arma server rpts (internal log files) reside inside %AppData%\Local\Arma 3. If you’re running multiple server instances like me, that’s quite a mess. Change log directory First, create a directory logs_server1 inside your Arma3 Server base-directory. Now you can use the -profiles flag to change the directory: arma3server.exe -server -port=4102 -profiles=logs_server1

March 17, 2015 · Benedikt Lang

Build heka on Windows

Since there is currently no public release of heka 0.9 available for windows, the only way is to build it. First of all, you need to install the compiler chain: TDM-GCC MinGW Compiler CMake Go And some other stuff like utilities: Git Make sure to select Use on command line Mercurial Pay attention to installer options, path must be set for all these binaries. Getting heka git clone https://github.com/mozilla-services/heka.git Note: You can not use a source release from github releases, a ....

March 17, 2015 · Benedikt Lang

CoreOS Qemu Image - Extend Docker graph size

CoreOS ships by default with a runnable qemu image which works quite nicely. One problem i encountered fairly early is the lack of disk space. If the reason for this is a big docker graph the solution might be to move your docker graph entirely. A nice side effect is the ability to persist your graph and optimize I/O rate by using direct disk access. Create a seperate disk for dockers graph I’m using lvm volumes for this:...

March 16, 2015 · Benedikt Lang

Systemd Unit Network DHCP not ready

After installing coreos on a hetzner server i realized that fleet unit files pulling from docker fail on boot, because there was no dhcp lease yet. dial tcp: lookup index.docker.io: connection refused journalctl shows that dhcp gets an ip after starting the container unit file, therefore docker pull fails. Solution First you have to add a network dependency to your unit file: Wants=docker.service etcd.service network-online.target After=docker.service etcd.service network-online.target But the network-online....

January 18, 2015 · Benedikt Lang

Travis-ci Golang Binary Github Release

If you’re working on a golang project which results in an usable binary, you might want to let travis-ci do the work for you. Travis will test and build your project and create a github release with the binary attached. .travis.yml language: go go: - 1.3 install: - "go get -d -v ./..." - "go build -v ./..." deploy: provider: releases api_key: secure: [YOUR ENCRYPTED OAUTH TOKEN] file: "[NAME OF YOUR PRODUCED BINARY]" skip_cleanup: true on: repo: [YOUR REPO e....

July 28, 2014 · Benedikt Lang

Golang Exporting

While i’m learning golang and searching the web for every possible talk and docs about it, i experienced that i can’t find a good doc about the exporting features. By export i’m refering to the mechanism to export types, method and properties to the world outside the package. Exporting You already might know that you can export types by starting its name with an upcase letter. But there are many edge cases like a public struct with private fields which i will talk about in this post....

March 28, 2014 · Benedikt Lang