Skip to content

Instantly share code, notes, and snippets.

View benhubert's full-sized avatar

Benjamin Hubert benhubert

View GitHub Profile
@benhubert
benhubert / Car.java
Last active January 18, 2021 15:51
Be careful with members of members
@Override
public String toString() {
return "Car{" +
"id=" + id +
", name='" + name + '\'' +
", owner=" + owner.getId() +
'}';
}
@benhubert
benhubert / howto-use-obs-for-video-conferences.md
Last active October 28, 2020 21:13
Use OBS Studio for video conferences

How to use OBS Studio for professional video conferences

(for ArchLinux)

Install OBS studio

yay -S obs-studio

Virtual Camera

@benhubert
benhubert / 00-docker-shorewall.md
Created July 6, 2019 20:50 — forked from lukasnellen/00-docker-shorewall.md
setup shorewall for docker networking beyond the default bridge network, e.g., for docker-compose

Docker(-compose) with shorewall

The shorewall documentation explains in http://shorewall.org/Docker.html how to configure shorewall for use with docker. The problem with the configuration is that it only allows connections from the host to the main bridge docker0. Connections to other networks on dynamically created bridges, with names starting by default with br-, is blocked. Instead of the recommended contents of /etc/shorewall/interfaces, use wild-card interface names as follows:

#ZONE	INTERFACE	OPTIONS
#dock	docker0		bridge     # disabled default recommendation
dock 	docker0		physical=docker+,routeback=1
dock 	br		physical=br-+,routeback=1
@benhubert
benhubert / generate-phrase-4096.sh
Created April 28, 2019 19:27
Generate passphrase of 4096 characters
head -c 409600 /dev/urandom | tr -dc 'A-Za-z0-9!"#$%&\'\\\'\'()*+,-./:;<=>?@[\\]^_`{|}~' | head -c 4096
@benhubert
benhubert / install-archlinux-on-rock-pi-4.md
Created April 27, 2019 17:41
Install ArchLinuxARM on Rock Pi 4 (not working)

Installing Archlinux on Rock Pi 4

Does not work. This is just a documentation of my results, what I found out and what might be a good starting point for someone else, trying the same thing. Hope it helps.

https://www.armbian.com/rock-pi-4/

Useful links

@benhubert
benhubert / archlinuxarm-rpi3-cheatsheet.md
Last active April 3, 2025 18:02
Chat Sheet for ArchlinuxARM installation on Raspberry Pi 3

ArchlinuxARM Cheat Sheet

Default credentials:

  • alarm / alarm
  • root / root

Basic setup with btrfs

The following setup requires qemu-arm-static and arch-chroot to be installed on the system where the SD card is prepared. So, start with

@benhubert
benhubert / cryptsetup.md
Last active January 19, 2021 20:35
cryptsetup cheat sheet

cryptsetup cheat sheet

Wipe disk

cryptsetup open --type plain -d /dev/urandom /dev/sdX to-be-wiped
dd if=/dev/zero of=/dev/mapper/to-be-wiped status=progress bs=4M
cryptsetup close to-be-wiped
@benhubert
benhubert / merge-git-repos.sh
Created March 28, 2019 20:56
Merge git repositories and keep their history
# Initialize the new repository in an empty directory
git init
# Before we can do a merge, we need some initial commit. Create a file that's
# not part of any of the repos you want to merge, for example
touch delete-me-afterwards.txt
git add .
git commit -m "initial commit"
@benhubert
benhubert / remove-jira-detail-view.user.js
Last active March 31, 2020 12:17
Removes detail view from Jira's Rapid Board.
// ==UserScript==
// @name Disable detail view in Jira Rapid Board
// @namespace https://tampermonkey.benjaminhubert.at/
// @version 1.7
// @description Removes the detail view from Jira's Rapid Board which is an annoying feature in my eyes.
// @author Benjamin Hubert, Lukas Schneider, Florian Mautendorfer
// @match https://*/secure/RapidBoard.jspa*
// @grant none
// @require http://code.jquery.com/jquery-3.3.1.min.js
// ==/UserScript==
@benhubert
benhubert / StatsD datadog example
Created September 20, 2017 12:22
example for blogpost at tech.willhaben.at
statsd.recordExecutionTime(“example.stat”, 25, “cluster:foo”, “http.status:200”);