Skip to content

Instantly share code, notes, and snippets.

View AntonFriberg's full-sized avatar
Automating database migrations

Anton Friberg AntonFriberg

Automating database migrations
  • Axis Communications
  • Lund, Sweden
  • 01:46 (UTC +02:00)
  • LinkedIn in/antonfriberg
View GitHub Profile
AntonFriberg /
Last active August 1, 2018 13:10
Minikube install using kvm2 behind coorporate proxy on Debian stretch
set -e
echo "Installing kubectl $KUBECTL_VERSION and minikube $MINIKUBE_VERSION"
echo "Setting proxy settings including minikube ip range"
export no_proxy=localhost,,,
export NO_PROXY=$no_proxy
AntonFriberg / fonts.conf
Created June 4, 2017 15:36
Debian better font rendering
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<match target="font">
<edit mode="assign" name="rgba">
<match target="font">
<edit mode="assign" name="hinting">
AntonFriberg /
Created May 3, 2019 15:08
Polybar install on Debian Stretch

Polybar install on Debian Stretch

Install dependencies including libxcb-composite0-dev which is sometimes not mentioned.

$ sudo apt-get install cmake cmake-data libcairo2-dev libxcb1-dev libxcb-ewmh-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-randr0-dev libxcb-util0-dev libxcb-xkb-dev pkg-config python-xcbgen xcb-proto libxcb-xrm-dev i3-wm libasound2-dev libmpdclient-dev libiw-dev libcurl4-openssl-dev libpulse-dev libxcb-composite0-dev

Clone the official [Polybar repository].

AntonFriberg /
Created December 4, 2019 12:15
S3 partition extraction in Python
import re
regex = r"(year|month|day|hour)=(\d+)"
test_str = "s3://bucket/datalake/year=2019/month=12/day=02/hour=06"
matches = re.finditer(regex, test_str)
partition = { int( for match in matches}
# {'year': 2019, 'month': 12, 'day': 2, 'hour': 6}
AntonFriberg /
Created March 11, 2020 14:06 — forked from JonasAlfredsson/
Make Cinnamon/Gnome respect the /etc/X11/xorg.conf file instead of ~/.config/displays.xml

Make Cinnamon/Gnome/Mate Respect xorg.conf

By default the Cinnamon/Gnome/Mate desktop environment loads its own display configuration from the file ~/.config/monitors.xml instead of using the settings defined in /etc/X11/xorg.conf. This can be a little bit annoying if you are using the nvidia-settings program to configure your displays (which will use xorg.conf), since anything entered there will be overridden by monitors.xml every reboot.

By doing the following changes we will disable the "Display Manager" in

AntonFriberg / pyproject.after.toml
Last active April 7, 2020 14:30
bug report pyproject.toml
name = "application"
version = "1.0"
description = "An application."
authors = ["Anton Friberg <>"]
readme = ""
# Allow default command line entrypoint
etl = "etl.__main__:cli"
AntonFriberg /
Last active May 13, 2020 11:22 — forked from kylemanna/
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
AntonFriberg /
Last active May 22, 2020 09:21
Emoji Test String

😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃

AntonFriberg /
Last active April 1, 2021 13:07
Samsung ML-2160 printer install on Arch Linux

How to install Samsung ML-2160 in Arch Linux

In order to use a USB connected Sasmung ML-2160 printer in Arch Linux you will need to first install the correct drivers. For this perticular printer the drivers are included in the samsung-unified-printer AUR package.

If you know what you are doing I recommend installing it using a AUR helper such as yay.

AntonFriberg /
Created June 9, 2021 15:52
Configuring user class on DHCP client Ubuntu 20.04

Todo: Add background info