Skip to content

Instantly share code, notes, and snippets.


Anton Friberg AntonFriberg

  • Lund University, Axis Communications
  • Malmö, Sweden
View GitHub Profile
AntonFriberg / Dockerfile
Last active Apr 9, 2021
Simple docker cron sidecar container based on alpine image
View Dockerfile
FROM alpine:3.8
# Alpine comes with built in cron schedules
# min hour day month weekday command
# */15 * * * * run-parts /etc/periodic/15min
# 0 * * * * run-parts /etc/periodic/hourly
# 0 2 * * * run-parts /etc/periodic/daily
# 0 3 * * 6 run-parts /etc/periodic/weekly
# 0 5 1 * * run-parts /etc/periodic/monthly
AntonFriberg /
Last active Apr 1, 2021
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 / about:config
Created May 10, 2019
Fix Firefox right-click menu with i3 Window Manager
View about:config
AntonFriberg /
Last active Jan 19, 2021
Swerty Keyboard Layout with working Alt-Gr on Linux Debian 10


The Swerty keyboard layout is created by Johan E. Gustafsson and hosted on

Swerty is released under the MIT Licence.

Since I spend a lot of time getting the right alt-gr key to work I decided to share back my fixes.


AntonFriberg /
Last active Dec 26, 2020
Extract key value pairs from string with quotes in Python 3
"""Extract key value pairs in Python 3 using shlex and regex."""
import re
import shlex
def regex_kv_pairs(text, item_sep=r"\s", value_sep="="):
Parse key-value pairs from a shell-like text with regex.
This approach is ~ 25 times faster than the shlex approach.
AntonFriberg / fonts.conf
Created May 28, 2020
Fix ugly Calibri, Cambria font rendering on Linux
View fonts.conf
<!-- Add this to your font configuration e.g ~/.config/fontconfig/fonts.conf -->
<!-- Note that this will disable all embedded bitmaps in fonts that use them -->
<!-- disable embedded bitmaps in fonts to fix Calibri, Cambria, etc. -->
<match target="font">
<edit mode="assign" name="embeddedbitmap"><bool>false</bool></edit>
AntonFriberg /
Last active May 22, 2020
Emoji Test String

😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃

AntonFriberg /
Last active May 13, 2020 — forked from kylemanna/
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
AntonFriberg / pyproject.after.toml
Last active Apr 7, 2020
bug report pyproject.toml
View pyproject.after.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 Mar 18, 2020
Asian Characters ArchLinux

In order to get Asian Characters to render properly on ArchLinux you need to install a font which supports them. Even if you cannot read any of the characters I find it useful to have them installed to get wikipedia articles on geographical locations to render properly.

In order to cover most of Asia I installed the following fonts:

  • adobe-source-han-serif-cn-fonts
  • adobe-source-han-serif-jp-fonts
  • adobe-source-han-serif-kr-fonts