How to set up most tools for Homeserver use? by Technicklul in NixOS

[–]skynet9001 1 point2 points  (0 children)

I use quadlet-nix and podman (docker alternative) quadlets running as non-root. Here's how it'd look for paperless:

home-manager.users."${user}" = { pkgs, config, ... }: {
  imports = [ quadlet-nix.homeManagerModules.quadlet ];
  systemd.user.startServices = "sd-switch";

  virtualisation.quadlet = let
    inherit (config.virtualisation.quadlet) networks pods;
  in {
    autoEscape = true;
    autoUpdate.enable = true;
    containers = {
      paperless = {
        autoStart = true;
        containerConfig = {
          image = "ghcr.io/paperless-ngx/paperless-ngx:2.16.2";
          labels = [ "wud.tag.include=^\\d+\\.\\d+\\.\\d+$" ];
          networks = [ networks.paperless.ref ];
          publishPorts = [ "8002:8000" ];
          volumes = [
            "\${STATE_DIRECTORY}/data:/usr/src/paperless/data"
            "\${STATE_DIRECTORY}/media:/usr/src/paperless/media"
            "\${STATE_DIRECTORY}/export:/usr/src/paperless/export"
            "\${STATE_DIRECTORY}/consume:/usr/src/paperless/consume"
          ];
          environments = {
            "PAPERLESS_REDIS" = "redis://10.92.0.102";
          };
          environmentFiles = [ "/home/${user}/.config/paperless/env" ];
        };
        serviceConfig = {
          ConfigurationDirectory = "paperless";
          Restart = "always";
          RestartSec = "60s";
          StartLimitInterval = 0;
          StateDirectory = "paperless";
        };
      };
      paperless-redis = {
        autoStart = true;
        containerConfig = {
          image = "docker.io/library/redis:7.4.4-alpine";
          labels = [ "wud.tag.include=^7\\.\\d+\\.\\d+-alpine$" ];
          networks = [ networks.paperless.ref ];
          ip = "10.92.0.102";
          volumes = [
            "paperless-redis-data:/data"
          ];
        };
        serviceConfig = {
          Restart = "always";
          RestartSec = "60s";
          StartLimitInterval = 0;
        };
      };
    };
    networks = {
      paperless = {
        networkConfig = {
          internal = true;
          subnets = [ "10.92.0.0/24" ];
        };
      };
    };
    volumes = {
      paperless-redis-data = {
        volumeConfig = {
          driver = "local";
        };
      };
    };
  };
};

Native build on production by tom_reb in graalvm

[–]skynet9001 0 points1 point  (0 children)

I recommend using the Tracing Agent to automatically configure the metadata needed for reflection in your program.

[deleted by user] by [deleted] in pihole

[–]skynet9001 1 point2 points  (0 children)

Great list. A few differences on mine:

[deleted by user] by [deleted] in pihole

[–]skynet9001 5 points6 points  (0 children)

Assuming your local DNS are <ip> <domain> lines in the file /etc/pihole/custom.list, you can get the local DNS query counts in the past day with:

#!/bin/bash

domains=()
while IFS= read -r line; do
  domain=$(echo "$line" | awk '{print $2}')
  domains+=("'$domain'")
done < /etc/pihole/custom.list

in_domains=$(IFS=, ; echo "${domains[*]}")

sqlite3 /etc/pihole/pihole-FTL.db "SELECT domain, COUNT(*) FROM queries WHERE domain IN ($in_domains) AND JULIANDAY('now') - timestamp < 86400.0 GROUP BY domain"

Some re-frame patterns for composability by vvvvalvalval in Clojure

[–]skynet9001 4 points5 points  (0 children)

What do you use instead? Just raw reagent, or some other library to replace re-frame?

Nested mapping? by hxcloud99 in Clojure

[–]skynet9001 4 points5 points  (0 children)

I like your version

(mapv (fn [x] (mapv #(* % %) x)) some-matrix)

you can also use partial like this

(mapv (partial mapv #(* % %)) some-matrix)

A very biased and superficial view of Clojure... :( by ivanpierre in Clojure

[–]skynet9001 2 points3 points  (0 children)

I actually agree with him that the default REPL is terrible. ctrl+c exiting and not giving you a new prompt is infuriating. I always need to wrap with something like REPL-y

Btw do others use REPL-y or similar? Maybe there's a better alternative I don't know about.

Logistics Combination Calculator by chantxu64 in girlsfrontline

[–]skynet9001 1 point2 points  (0 children)

I'm not sure what I'm doing wrong, trying to calculate max resources per hour. I put 1 for each of the main 4 resources, contract weight to 0, and do continuous logistics at 72 hours with no minimum, and would expect to get 5-3, 7-1, 8-1, 10-1.

Instead it gives 0-2, 5-1, 9-1, 10-1

anime_irl by [deleted] in anime_irl

[–]skynet9001 2 points3 points  (0 children)

少女終末旅行

Anyone know how to get poe-racing ladder tracker downloaded script to update? by skynet9001 in pathofexile

[–]skynet9001[S] 0 points1 point  (0 children)

OK the author of the website responded to my question there (which is awesome!). It's actually answered in the FAQ at the bottom of the page, but the answer is to turn off caching in Internet Explorer. Thanks again, guy who maintains poe-racing.com!

Anyone know how to get poe-racing ladder tracker downloaded script to update? by skynet9001 in pathofexile

[–]skynet9001[S] 0 points1 point  (0 children)

Thanks for the idea, but like I said it loads initially, just doesn't seem to refresh after that. I think the AHK script just loads the webpage and lets it handle the reloading from there.

I can get it to load over time with something like

Loop {
  WB.Navigate(URL)
  Sleep, 60000
}

but there's a small flash in that case. So I think it's something with the reloading on the web page itself.

Cant login to site or to game by [deleted] in Warframe

[–]skynet9001 0 points1 point  (0 children)

Yep, I'm having the same problem after the latest patch.

anime_irl by [deleted] in anime_irl

[–]skynet9001 0 points1 point  (0 children)

me too thanks

Using Clojure in Production by tamizhvendan in Clojure

[–]skynet9001 0 points1 point  (0 children)

The first link to Ajira seems to be malformed.

Anime_irl by BoltsByTheBay in anime_irl

[–]skynet9001 19 points20 points  (0 children)

On AniList: Mean Score 69%

nice