Skip to content

Instantly share code, notes, and snippets.

@catnipsy
catnipsy / rclone_copy.py
Last active July 13, 2025 16:35
rclone parallel transfer with TUI
#!/usr/bin/env python3
import curses
import subprocess
import os
from pathlib import Path
import select
def get_latest_entries(directory, limit=10):
entries = list(Path(directory).iterdir())
@catnipsy
catnipsy / Rclone systemd service.md
Created June 16, 2025 06:10 — forked from kabili207/Rclone systemd service.md
Rclone systemd user service

rclone systemd service

Preparation

This service will use the same remote name you specified when using rclone config create. If you haven't done that yet, do so now.

Next, create the mountpoint for your remote. The service uses the location ~/mnt/<remote> by default.

mkdir ~/mnt/dropbox
@catnipsy
catnipsy / fix.md
Created June 15, 2025 12:51 — forked from crypt0rr/fix.md
Intel e1000e fix - Proxmox

Fix Intel e1000e error

Please note - you may want to validate whether the options used affect your setup.

Create a new service file.

nano /etc/systemd/system/disable-offloading.service
@catnipsy
catnipsy / proxmox_web_gui_api_lets_encrypts_acme_alias_mode_duck_dns-english.md Step-by-step guide to configure Proxmox Web GUI/API with Let’s Encrypt certificate and automatic validation using the ACME protocol in DNS alias mode with DNS TXT validation redirection to Duck DNS.

Step-by-step guide to configure Proxmox Web GUI/API with Let’s Encrypt certificate and automatic validation using the ACME protocol in DNS alias mode with DNS TXT validation redirection to Duck DNS.


Objective

We want to use a certificate in Proxmox GUI/API issued for free by a Certificate Authority trusted by default in browsers and operating systems. The chosen Certificate Authority will be Let's Encrypt [1]. Since the issued certificates are valid for only 90 days, automating the certificate renewal process is crucial. For this purpose, the Automatic Certificate Management Environment (ACME, RFC8555) protocol will be used [2].


esphome:
name: d1-mini
friendly_name: D1 mini
esp8266:
board: d1_mini
# Enable logging
logger:
level: INFO
@catnipsy
catnipsy / ccache.conf
Created March 27, 2024 12:23
iccecream ccache config
prefix_command=icecc
prefix_command_cpp=icecc
@catnipsy
catnipsy / gist:1b368acc82a3f80a8cb3ccd11b504342
Created December 24, 2023 13:28
site2site nat wg client
[Interface]
Address = 10.0.0.x/32
PrivateKey = xxx
ListenPort = 51820
DNS = xx
PreUp = sysctl -w net.ipv4.ip_forward=1
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth+ -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth+ -j MASQUERADE
[Peer]
@catnipsy
catnipsy / compose.yaml
Created December 12, 2023 15:48
Pi-hole on wireguard client
---
version: "2.1"
networks:
private_network:
name: internal
ipam:
driver: default
config:
- subnet: 10.100.0.0/24
services:
@catnipsy
catnipsy / tree-red.cpp
Last active November 27, 2023 07:48
tree reduction
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <thread>
#include <mutex>
#include <cstring>
constexpr bool isPowerOf2(int n) { return (!(n & (n - 1))); }
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
const int M = 10;
const int N = 64;
float simple(float A[][N], int m, int n) {
float sum = 0;