Skip to content

Instantly share code, notes, and snippets.

View AntonFriberg's full-sized avatar
🚀
Back to work after parental leave

Anton Frost, né Friberg AntonFriberg

🚀
Back to work after parental leave
  • Axis Communications
  • Lund, Sweden
  • 00:49 (UTC +01:00)
  • LinkedIn in/antonfriberg
View GitHub Profile
@AntonFriberg
AntonFriberg / README.md
Created August 3, 2024 13:40
How to install and configure a basic Hyprland setup on Ubuntu 24.04 using Nix and Home Manager

Hyprland on Ubuntu 24.04

Hyprland is not available by default on Ubuntu 24.04 so instead we can utilize the Nix package manager and Home Manager.

Nix

The benefit of the Nix package manager compared to others in this case is that the package and dependencies of Nix packages is immutable and self contained. This means that the entire setup is contained to a separate /nix path. Changes to Nix packages does not break Ubuntu and changes to Ubuntu does not break Nix packages.

@AntonFriberg
AntonFriberg / README.md
Created August 1, 2024 10:39
Bring up Ubuntu 24.04
@AntonFriberg
AntonFriberg / ssht.fish
Created March 5, 2024 13:04
Fish function for transferring terminfo to remote server over ssh
function ssht
# Set the remote server's address
set remote_server $argv[1]
# Export the terminal info to a temporary file
set tmp_file (mktemp)
infocmp >$tmp_file
# Transfer the terminfo file to the remote server
scp $tmp_file $remote_server:/tmp/
@AntonFriberg
AntonFriberg / create_event_from_email.gs
Created July 14, 2023 15:24
Create Event from Booking Email using Google App Scripts
// What to add to the parsed ISO date to get it in correct timezone
TZ_POSTFIX = 'T00:00:00+02:00';
// Email subjects to look at
SUBJECT_NEW_BOOKING = 'New Booking - Some Service';
// Matches '2023-07-14 00:00 - 2023-07-14 00:00' like strings with groups for each date
DATE_RANGE_PATTERN = new RegExp('(\\d{4}-\\d{2}-\\d{2}) 00:00 - (\\d{4}-\\d{2}-\\d{2}) 00:00');
// Regex patterns to extract other content such as name, apartment, email
NAME_PATTERN = new RegExp('<td>Name:<\\/td>[\\n\\s]+<td>(.*)<\\/td>');
APARTMENT_PATTERN = new RegExp('<td>Apartment:<\\/td>[\\n\\s]+<td>(.*)<\\/td>');
EMAIL_PATTERN = new RegExp('<td>Email:<\\/td>[\\n\\s]+<td>(.*)<\\/td>');
@AntonFriberg
AntonFriberg / README.md
Last active September 26, 2024 14:05
Multiple Python Installations on Linux Using Mise-en-Place (an asdf rust clone)

Multiple Python Installations on Linux Using Mise

Note: Mise was previously called RTX

I have tried a lot different ways of managing multiple Python versions on different Linux systems.

  • pyenv
    • Uses shims which is confusing, especially for new users
  • Compiling from source
@AntonFriberg
AntonFriberg / README.md
Last active January 14, 2022 11:33
Access parquet files from S3 using ClickHouse

Parquet files from s3 using ClickHouse

Accessing the prompt

Start the clickhouse-client and connect it to your ClickHouse Server.

$ clickhouse-client --host=<host> --port=<port> --user=<user> --password=<password>

You should be greated by the ClickHouse prompt

ClickHouse client version 21.12.3.32 (official build).
@AntonFriberg
AntonFriberg / README.md
Created June 9, 2021 15:52
Configuring user class on DHCP client Ubuntu 20.04

Todo: Add background info

@AntonFriberg
AntonFriberg / install-swerty-altgr-working.md
Last active October 16, 2024 09:45
Swerty Keyboard Layout with working Alt-Gr on Linux Debian 10

Background

The Swerty keyboard layout is created by Johan E. Gustafsson and hosted on http://johanegustafsson.net/projects/swerty/

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.

Installation

@AntonFriberg
AntonFriberg / install.md
Last active October 9, 2024 16:13
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
AntonFriberg / fonts.conf
Created May 28, 2020 17:00
Fix ugly Calibri, Cambria font rendering on Linux
<!-- 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>
</match>