Skip to content

Instantly share code, notes, and snippets.

View st3fan's full-sized avatar

Stefan Arentz st3fan

View GitHub Profile
root@bee:/home/stefan# smartctl -A /dev/sda
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.12.90+deb13.1-amd64] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0032 100 100 000 Old_age Always - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 89944
use std::sync::Mutex;
use actix_web::{delete, get, post, put, web, App, HttpResponse, HttpServer, Result};
use rusqlite::{Connection, OptionalExtension};
use serde::{Deserialize, Serialize};
use utoipa::{OpenApi, ToSchema};
use utoipa_swagger_ui::SwaggerUi;
#[derive(Serialize, ToSchema)]
struct Thing {
id: i32,
FROM alpine:3.20.2
ARG TARGETARCH
COPY foo-${TARGETARCH} /usr/local/bin/foo
ENTRYPOINT ["/usr/local/bin/foo"]
window.onload = (event) => {
const formatter = new Intl.DateTimeFormat('default', {
weekday: 'short',
year: 'numeric',
month: 'long',
day: 'numeric',
hour: 'numeric',
minute: 'numeric',
second: 'numeric'
});
# /etc/unbound/unbound.conf.d/forwarder.conf
server:
interface: 0.0.0.0
port: 53
do-ip4: yes
do-udp: yes
do-tcp: yes
tls-cert-bundle: "/etc/ssl/certs/ca-certificates.crt"
-- Add all upstream DoT servers to one pool
newServer{address="tls://8.8.8.8", tlsHostname="dns.google"}
newServer{address="tls://8.8.4.4", tlsHostname="dns.google"}
newServer{address="tls://1.1.1.1", tlsHostname="cloudflare-dns.com"}
newServer{address="tls://1.0.0.1", tlsHostname="cloudflare-dns.com"}
-- Listen on port 53 (main DNS port)
addLocal("0.0.0.0:53")
-- Use round-robin or another strategy across all servers
-- Define backend pools
newServer{address="tls://8.8.8.8", pool="google", tlsHostname="dns.google"}
newServer{address="tls://8.8.4.4", pool="google", tlsHostname="dns.google"}
newServer{address="tls://1.1.1.1", pool="cloudflare", tlsHostname="cloudflare-dns.com"}
newServer{address="tls://1.0.0.1", pool="cloudflare", tlsHostname="cloudflare-dns.com"}
-- Define local listeners
addLocal("127.0.0.1:5301", {pool="google"})
addLocal("127.0.0.1:5302", {pool="cloudflare"})
# From https://coredns.io/plugins/forward/
. {
forward . 127.0.0.1:5301 127.0.0.1:5302
}
.:5301 {
forward . tls://8.8.8.8 tls://8.8.4.4 {
tls_servername dns.google
}
@st3fan
st3fan / import-pocket-into-instapaper.py
Created May 27, 2025 00:19
Import your Pocket export into Instapaper
#!/usr/bin/env python3
# import-pocket-into-instapaper.py pocket/part_*.csv
import csv
import os
import sys
import time
import requests
import asyncio
import json
from agno.agent.agent import Agent
from aiodns import DNSResolver
async def query_address_records(hostname: str) -> str:
"""
Use this function to find the A and AAAA records for a given hostname.