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
  • 16:22 (UTC +01:00)
  • LinkedIn in/antonfriberg
View GitHub Profile
@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 / 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 / README.md
Created August 1, 2024 10:39
Bring up Ubuntu 24.04
@AntonFriberg
AntonFriberg / README.md
Last active August 17, 2025 11:30
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