Skip to content

Instantly share code, notes, and snippets.

View whazor's full-sized avatar

Nanne whazor

  • 09:37 (UTC +02:00)
View GitHub Profile
@whazor
whazor / Reddit-filter
Created November 19, 2023 21:46
Reddit app recommendation filter
! Reddit app ad
www.reddit.com##.XPromoPopupRpl
www.reddit.com##xpromo-new-app-selector
www.reddit.com##.bottom-bar, .XPromoBottomBar
www.reddit.com##.useApp,.TopNav__promoButton
www.reddit.com##body:style(pointer-events:auto!important;)
www.reddit.com##body:style(overflow: auto !important; position: static !important;)
@whazor
whazor / build.sh
Created November 18, 2023 17:20
NixOS Iso with SSH
nix build .#nixosConfigurations.machineIso.config.system.build.isoImage
ls result/iso/
# nixos-23.05.20231106.41de143-x86_64-linux.iso
@whazor
whazor / sunshine.nix
Created April 8, 2023 06:03
Running sunshine on nix as service
{pkgs, ...}: {
services.udev.enable = true;
services.udev.extraRules = ''
# Your rule goes here
KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput"
'';
security.wrappers = {
sunshine = {
source = "${pkgs.sunshine}/bin/sunshine";
@whazor
whazor / .gitignore
Created December 12, 2022 17:26
terraform sops
# .tfstate files
*.tfstate
*.tfstate.*
# do not ignore encrypted tfstate files, with .enc inside
!*.enc.tfstate
!*.enc.tfstate.*
# unless it is decrypted
*.decrypted*tfstate
@whazor
whazor / manual.sh
Created June 16, 2022 20:09
Manual flux helm upgrade
#!/bin/bash
if [ ! -f $1 ]; then
echo "Error: $1 is not existing file path."
exit 1
fi
lines=$(cat cluster/config/cluster-settings.yaml | yq '.data | ... comments=""';\
sops --decrypt cluster/config/cluster-secrets.enc.yaml | yq '.stringData | ... comments=""')

Keybase proof

I hereby claim:

  • I am whazor on github.
  • I am whazor (https://keybase.io/whazor) on keybase.
  • I have a public key ASBy7u_Cmq1Lsgh4qhEja9v_LNS2CEIkZxs7us6Pl7B-uAo

To claim this, I am signing this object:

#!/usr/bin/env bash
KEYCLOAK_URL="http://localhost:8080"
KEYCLOAK_USER="admin"
KEYCLOAK_PASSWORD="admin"
KEYCLOAK_CLIENT_ID="terraform"
# KEYCLOAK_CLIENT_SECRET="884e0f95-0f42-4a63-9b1f-94274655669e"
echo "Logging into keycloak admin"
WITH RECURSIVE p(current_game_number) AS
(WITH players AS (SELECT DISTINCT player_name FROM players)
SELECT (select min(id) from plays) AS game_number, player_name, 1000.0 AS elo
FROM players
UNION ALL
(WITH previous_elos AS (SELECT * FROM p)
SELECT plays.id,
player_name,
CASE
DO $$
<<outer_block>>
declare
left_rating int;
left_player varchar(100);
left_scoring int;
right_rating int;
right_player varchar(100);
right_scoring int;
begin
047ee02e348d35995b5a85cb1eea393117ba447cc8755bd61e5e680c0bd1a07ad7cde18e2adee5cb9bd7e4da640d83f833b766aac5a6e3d08c8dd450ad372328ae;Roconda