Skip to content

Instantly share code, notes, and snippets.

View sicet7's full-sized avatar

Martin René Sørensen sicet7

View GitHub Profile
@sicet7
sicet7 / configuration.nix
Last active June 7, 2025 09:41
My Nixos Configuration
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, lib, ... }:
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz";
dotnetPkg = pkgs.dotnetCorePackages.sdk_8_0;
forcedUnstable = import
(builtins.fetchTarball https://github.com/nixos/nixpkgs/tarball/nixpkgs-unstable)
@sicet7
sicet7 / index.html
Last active February 7, 2024 12:41
[POC] Using SharedWorker in vanilla javascript to synchronize data between tabs/windows when polling an expensive computation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>
</head>
<body>
<p id="data-output">Nothing</p>
<script type="text/javascript">
const DomUpdateWorker = {
@sicet7
sicet7 / danish-holidays.js
Last active October 14, 2025 14:14
Check if a given JavaScript Date is a Danish public holiday, (converted via. ChatGPT from PHP)
/**
* Check if a given JavaScript Date is a Danish public holiday,
* using the same rules and Easter algorithm as in the provided PHP.
* - No external libraries
* - Works in the browser
* - Uses Europe/Copenhagen civil date for comparisons
*
* @param {Date} date A JavaScript Date (any timezone)
* @returns {boolean} true if the Copenhagen date is a holiday
*/