Skip to content

Instantly share code, notes, and snippets.

View Darkflib's full-sized avatar
💭
Even an infinite number of monkeys is right twice a day... Or something

Mike Preston Darkflib

💭
Even an infinite number of monkeys is right twice a day... Or something
View GitHub Profile

How many R’s are in strawberry?


There are 2 R's in strawberry


Spell out each letter and say whether it is an R or not.

@Darkflib
Darkflib / woodchuck.md
Created August 8, 2025 09:50
gpt-oss-20b

<|channel|>analysis<|message|>We need to explain calculation, maybe referencing folklore. Provide humorous explanation, use physics, volume, weight.<|end|>

<|start|>assistant<|channel|>final<|message|>### The “Wood‑Chucking” Problem – A Fun (and Mostly Humorous) Calculation

The classic tongue‑twister “How much wood would a woodchuck chuck if a woodchuck could chuck wood?” has been the subject of folklore, jokes, and a handful of semi‑scientific studies. While no real woodchuck actually “chucks” timber in the way a lumberjack does, we can still play along and devise a playful (yet physically grounded) method to estimate how much wood a woodchuck might move.

Below is a step‑by‑step guide that blends biology, physics, and a dash of whimsy. Feel free to adjust assumptions or add your own flair!


Below is a step‑by‑step guide for using Firebase Authentication from Python.
I’ll cover two typical scenarios:

Scenario What you’ll do in Python Which library you’ll use
Client‑side (desktop / script) – sign‑up, sign‑in, password reset, etc. Use the Firebase REST API (wrapped in the community library Pyrebase). pyrebase (or pyrebase4)
Server‑side (backend, admin tasks) – verify ID tokens, create custom tokens, manage users. Use the Firebase Admin SDK (official). firebase-admin

Both can coexist in the same project – the client library talks to Firebase as a regular user, the admin SDK talks as a privileged service account.

The Path of the Daemonist

1. The Neophyte (The Watcher at the Console)

Focus: Learning to observe, not yet to summon.

  • Teachings:

    • Understand what a daemon is: background processes, terminal detachment, PID files.
    • Learn to identify running daemons (ps, top, htop) and read logs (journalctl, /var/log/).
@Darkflib
Darkflib / README.md
Last active July 29, 2025 20:11
Example from a current project. I have a language specific file (I actually rolled my own details into them to give defaults on the pyproject and other places) + project files.

Diagrams API

This repository contains the source code for the Diagrams API, which is a web service that allows users to compile diagrams programmatically via mermaid and plantuml. The API is designed to be simple and efficient, providing endpoints for generating diagrams in various formats.

Features

  • Generate diagrams using Mermaid and PlantUML syntax
  • Support for multiple output formats (e.g., PNG, SVG)
  • Easy integration with other applications
  • RESTful API design
@Darkflib
Darkflib / useful.md
Created July 9, 2025 09:48
Useful stuff

This is a fantastic project! Building a sensory chair with your step-son is an incredible way to bond, empower him, and create something that is perfectly tailored to his unique sensory needs. Your tech background is a huge asset here. Let's break down the concept of a "sensory chair" into different modules and ideas, ranging from simple to complex.

The core principle is user control and customization. For someone with AuDHD, the ability to control their sensory environment is paramount. The chair shouldn't just do things; it should be an instrument he can "play" to regulate his nervous system.

Core Concepts: The Sensory Inputs

Let's ideate based on the different sensory systems the chair can engage.

1. Proprioceptive Input (Deep Pressure)

This is the sense of pressure and body awareness. It's often very calming and organizing for individuals on the autism spectrum.

18.5 Unofficial Rules of Software Engineering (The Bitterly Useful Edition)

  • Complexity always wins. Especially at 3am.

    Your clever abstraction becomes your 3am nightmare. Hope you like recursive stack traces.

  • Code you wrote 6 months ago was clearly the work of an idiot.

    Unfortunately, that idiot was you.

{
"black": [
"Our new diversity initiative mandates that all code reviews must now include ____.",
"The CEO announced that the company's biggest innovation this year was not a new product, but ____.",
"After the re-branding, our mission statement became 'Empowering ____ through ____ technology'.",
"The most controversial item on the quarterly all-hands agenda was ____.",
"We had to re-architect the entire system to ensure ____.",
"My performance review noted I needed to improve my ____.",
"The mandatory sensitivity training revealed that ____ is a microaggression.",
"To foster a more inclusive environment, we replaced 'master' branch with ____.",
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Enriched URL Feed</title>
<id>urn:uuid:0326710d-e689-405c-9fbb-6f7b13b9b213</id>
<updated>2025-06-10T16:02:55Z</updated>
<link rel="self" type="application/atom+xml" href="file:///enriched_feed.atom"/>
<entry>
<title type="text">Billionaire Cadogan family enjoy record profit from London estate</title>
<summary type="text">Cadogan family enjoy record profits in 2024, with retail rents on the King’s Road 8% above valuers’ expectations, a sign of booming demand</summary>
<link rel="alternate" type="text/html" href="https://www.thetimes.com/business-money/companies/article/billionaire-cadogan-family-enjoy-record-profit-from-london-estate-92kkmmbqv"/>