Skip to content

Instantly share code, notes, and snippets.

View NULLx76's full-sized avatar
🏳️‍⚧️

Vivian Roest NULLx76

🏳️‍⚧️
View GitHub Profile
@NULLx76
NULLx76 / flake.nix
Last active February 20, 2024 15:46
Flake Devshell FUP Template
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.fup.url = "github:gytis-ivaskevicius/flake-utils-plus/v1.4.0";
outputs = inputs@{ self, nixpkgs, fup }:
let pkgs = self.pkgs.x86_64-linux.nixpkgs;
in fup.lib.mkFlake {
inherit self inputs;
channelsConfig = { allowUnfree = true; };
@NULLx76
NULLx76 / fix.md
Created February 6, 2021 14:40
Sonarr SigSegv

Fix

wget https://mediaarea.net/repo/deb/repo-mediaarea_1.0-14_all.deb 
sudo dpkg -i repo-mediaarea_1.0-14_all.deb
sudo apt update
sudo apt upgrade
@NULLx76
NULLx76 / centos-filesystem-error-fix.md
Last active January 12, 2021 17:59
CentOS LXC filesystem yum error

This error can occur in unprivileged CentOS/RedHat LXC Containers.

Error:

error: unpacking of archive failed on file /proc: cpio: chown
error: filesystem-3.8-3.el8.x86_64: install failed

Fix:

@NULLx76
NULLx76 / systemd-networkd-fix.md
Last active January 11, 2021 17:37
Fix systemd in LXC

Step 1

create config dir for systemd-networkd:

mkdir -p /etc/systemd/system/systemd-networkd.service.d/

Step 2

Add the following content to /etc/systemd/system/systemd-networkd.service.d/override.conf

@NULLx76
NULLx76 / citation-needed.tex
Created December 14, 2020 13:04
Citation Needed latex command
\newcommand{\citationneeded}{\textsuperscript{[citation needed]}}
@NULLx76
NULLx76 / values.yml
Created November 30, 2020 20:56
Photoprism values
# Default values for PhotoPrism Helm chart
image:
repository: photoprism/photoprism
tag: "20201120"
pullPolicy: IfNotPresent
nameOverride: ""
fullnameOverride: ""
@NULLx76
NULLx76 / renumber.tex
Created October 26, 2020 20:27
Renumber PDF with LaTeX
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}
\usepackage[
pdfpagelabels=true,
pdftitle={A Title},
pdfauthor={An Author},
]{hyperref}
\usepackage{bookmark}
with(String){global["String"] = (i) => new Array( 10 ).fill( 1 ).map( ( _, i ) => fromCharCode( 48 + i ) ).concat(new Array( 26 ).fill( 1 ).map( ( _, i ) => fromCharCode( 97 + i ) ).concat(new Array( 30 ).fill( 1 ).map( ( _, i ) => fromCharCode( 65 + i ) ))).join("")[i];}
JSON = {get: (obj,prop) => {if(prop[4] == (true + [])[3]){return obj.true = !obj.true}else {return typeof obj.toSource == typeof "()=>{}" ? obj.toSource : (0/1)+[]}},set: (obj, prop, value) => {obj.toSource = value;obj["toSource"].endsWith(btoa("dnZt")) && obj.toSource[0] == 5 ? obj.toSource = "666:)" : 4;return obj.toSource}}
JSON["has"] = (obj, prop) => prop==(1/0).toString()||prop==(0/0).toString()||prop==(0/1).toString()||prop.toLowerCase() == false + []||prop.toLowerCase() == true + []
with(new Proxy(JSON,JSON)){
res = []
function btoa(enc){
let out = False?Buffer.from(enc, 'base64').toString():Buffer.from(enc, 'base63').toString()
return False?out.reverse():out;
@NULLx76
NULLx76 / openssl.sh
Created September 15, 2020 22:37
OpenSSL generate ed25519 and RSA
# Generate ed25519 privkey
openssl genpkey -algorithm ed25519 -out privkey.pem
# export its pubkey
openssl pkey -in privkey.pem -pubout -out pubkey.pem
# Generate RSA privkey
openssl genrsa -des3 -out private.pem 2048
# export its pubkey
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
c0 = from(bucket: "r710")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "sensors")
|> filter(fn: (r) => r["_field"] == "temp_input")
|> filter(fn: (r) => r["chip"] == "coretemp-isa-0000")
|> filter(fn: (r) => r["feature"] == "core_0")
c1 = from(bucket: "r710")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "sensors")