This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { config, pkgs, lib, ... }: | |
| let | |
| configFile = pkgs.writeText "init-mongo.sh" | |
| '' | |
| #!/bin/bash | |
| if which mongosh > /dev/null 2>&1; then | |
| mongo_init_bin='mongosh' | |
| else | |
| mongo_init_bin='mongo' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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 = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //REQUIREMENTS! | |
| //"phpseclib/phpseclib": "^3.0" | |
| //"lcobucci/jwt": "^5.0" | |
| require_once __DIR__ . '/vendor/autoload.php'; | |
| $json = '{ | |
| "keys": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "crypto/sha256" | |
| "encoding/base64" | |
| "encoding/binary" | |
| "fmt" | |
| "io" | |
| "math/rand" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Decode { | |
| If ($args[0] -is [System.Array]) { | |
| [System.Text.Encoding]::ASCII.GetString($args[0]) | |
| } | |
| Else { | |
| "Not Found" | |
| } | |
| } | |
| #$test = Get-WmiObject WmiMonitorID -Namespace root\wmi | |
| #$test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| echo "It now $(date +%d-%m-%Y_%H-%M)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| sudo apt install -y flameshot && \ | |
| gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot '[]' && \ | |
| gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot/']" && \ | |
| gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot/ name 'flameshot' && \ | |
| gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot/ command '/usr/bin/flameshot gui' && \ | |
| gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot/ binding 'Print' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| watch "mutagen list | tail --lines=2 | head --lines=1" | |
| docker stats --format="table {{.Name}}\t{{.CPUPerc}}\t{{.MemPerc}}\t{{.MemUsage}}\t{{.NetIO}}" |
NewerOlder