Skip to content

Instantly share code, notes, and snippets.

View digitaldrreamer's full-sized avatar
💭
I may be slow to respond. Gimme three days, at most ;)

digitaldπeamer digitaldrreamer

💭
I may be slow to respond. Gimme three days, at most ;)
View GitHub Profile
@digitaldrreamer
digitaldrreamer / minimal-rss.txt
Created August 19, 2026 21:44
Minimal RSS Structure for Dev.to
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>My Developer Blog</title>
<link>https://example.com/blog</link>
<description>Clean developer tutorials and guides.</description>
<item>
<title>How to Deploy Next.js to Cloudflare</title>
<link>https://example.com/blog/nextjs-cloudflare</link>
@digitaldrreamer
digitaldrreamer / helper-functions.ts
Created August 19, 2026 21:43
Helper Functions for Dev.to RSS Integration
// 1. Sanitize XML special characters
export function escapeXml(str: string): string {
return str
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&apos;")
}
@digitaldrreamer
digitaldrreamer / full-rss.txt
Created August 19, 2026 21:42
Full RSS structure for Dev.to
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>Engineering Blog</title>
<link>https://example.com/blog</link>
<description>Technical articles on web architecture and tooling.</description>
<language>en-us</language>
<lastBuildDate>Wed, 19 Aug 2026 21:00:00 GMT</lastBuildDate>
@digitaldrreamer
digitaldrreamer / blog.md
Created August 19, 2026 21:35
RSS structure for Dev.to

A guide to formatting an RSS 2.0 feed so DEV.to imports your articles, images, and tags with zero formatting errors.


1. Quick Checklist: What to Do

  • Wrap full article HTML inside <content:encoded><![CDATA[...]]></content:encoded>.
  • Convert all image src, srcset, and link href attributes to absolute URLs (https://domain.com/...).
  • Sanitize tags (``): alphanumeric only (a-z0-9), max 20 chars, max 4 tags per post.
@digitaldrreamer
digitaldrreamer / self-enforcing-treasury-ckb.md
Last active June 21, 2026 10:40
The Self-enforcing Treasury: A New Financial Patternon CKB [FINAL]

The Self-Enforcing Treasury: A New Financial Pattern on CKB

There is a class of financial coordination problem that always comes back to the same wall: someone has to hold the keys.

Multisig helps. DAOs help. But at the end of the chain there is always a person — or a committee — whose cooperation you need to move money. Governance stalls. Keys get lost. Committees get captured. The whole thing devolves into "trust us, we're the committee."

I stumbled onto a different approach while building a governance system on CKB. I want to document it because it's more general than the thing I built it for — and because CKB makes it possible in a way that other chains don't.

The problem that forced the insight

#!/bin/bash
# ============================================
# WAHA Plus Complete Production Deployment
# Version: 2.0.1 - Corrected and Verified
# ============================================
set -euo pipefail
# Colors for output
import express from "express"
import puppeteer from "puppeteer"
const router = express.Router()
/**
* Test endpoint that generates a Puppeteer PDF of the transaction document demo page
* Uses page.print() with PDF settings for high-quality output
*
* Query Parameters:
@digitaldrreamer
digitaldrreamer / Dockerfile
Last active April 20, 2025 15:23
Dockerfile for Crawlee (Playwright+Chromium) on ARM64
ARG NODE_VERSION=20
FROM --platform=linux/arm64 node:${NODE_VERSION}-bookworm-slim
LABEL maintainer="support@apify.com" description="Base image for Apify Actors using Chromium (ARM64)"
ENV DEBIAN_FRONTEND=noninteractive
# Install OS-level deps, Chromium, fonts, XVFB
RUN apt-get update \
&& apt install -y \
ca-certificates \
const express = require("express");
const Sentry = require("@sentry/node");
const prisma = require("./prisma"); // Adjust to the correct path for your Prisma instance
const { verifyFlutterwavePayment, fetchSubscriptions } = require("./functions/payment"); // Payment utility functions
const { FLUTTERWAVE_WEBHOOK_SECRET_DEV, FLUTTERWAVE_WEBHOOK_SECRET_PROD } = process.env; // Environment variables for webhook secrets
const { triggerUpdateNoBtn } = require("./functions/emails"); // Email notification utility
const logger = require("./utils/logger"); // Custom logger for structured logging
const { format } = require("timeago.js"); // Library for formatting dates relative to current time
const router = express.Router();
@digitaldrreamer
digitaldrreamer / Editorjs.svelte
Last active December 25, 2024 15:17
EditorJS with Svelte 5
<script>
import {onMount} from "svelte";
/**
* @type {EditorJS | null}
*/
let editor = $state(null);
/** @type {HTMLElement | null} */