Skip to content

Instantly share code, notes, and snippets.

View st3fan's full-sized avatar

Stefan Arentz st3fan

View GitHub Profile
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.
It looks like I encountered an issue resolving the MX records for some domains. "proteinpowdershake.com" could not be found. I'll try checking the rest and summarize the results.
I checked the MX records for the domains in the provided file. Here is the summary:
Domains using **Google Workspace**:
1. memeburn.com
2. eileenanddogs.com
3. muledesign.com
4. satoshidisk.com