Thanks to visit codestin.com
Credit goes to gist.github.com

Skip to content

Instantly share code, notes, and snippets.

@rcoh
rcoh / otp.py
Last active September 19, 2025 04:44
An implementation of Google Authenticator Compatible 2-factor Codes
"""
An implementation of TOTP as described in https://tools.ietf.org/html/rfc6238#section-4 aka Google Authenticator Style 2-factor Auth
"""
import base64
import datetime
import hashlib
import hmac
import sys
import struct
import time
@lexrus
lexrus / AI_007_prompt.en.txt
Last active September 19, 2025 04:44
AI 通宵干活 prompt
__This is the requirements section, please replace it yourself__
Above are the requirements, below are the decision-making requirements:
- I'm going to sleep now, all product and technical decisions are under your control, I'll come to review the results tomorrow morning
- I'll sleep for about 8 hours, so don't rush to produce results, take your time with all the details, don't save tokens, getting it right is most important
- When you encounter uncertainties, first check the documentation in context7, if still uncertain, search online
- Execute all subtasks in phases, run unit tests after each phase is completed, to avoid having to start over after completing everything only to find it doesn't work
- Don't get hung up on the UI part, try to use mainstream conventional approaches, I'll polish the details tomorrow, you just focus on getting the functionality working
@Illgot
Illgot / table-2.md
Created September 19, 2025 04:37 — forked from will-edward-moore/table-2.md
Markdown table: table-2
Metric What It Measures Good Benchmark
Conversion Rate Percentage of viewers who subscribe 2%+
Display Rate How often pop-up is shown to visitors 40-60%
Email Deliverability Successful email delivery rate 95%+
Welcome Email Open Rate Engagement with first email 50%+
Subscriber-to-Customer Rate Conversion to paying customers 15-25%

A Proof of Liabilities Scheme for Ecash Mints

Abstract: In this document, I will outline a proof-of-liabilities (PoL) scheme for ecash systems and Cashu specifically, which is a Chaumian ecash system for Bitcoin. The PoL scheme consists of three parts. First, a publicly auditable list of all issued ecash tokens in the form of mint proofs, and second, a publicly auditable list of all redeemed ecash tokens in the form of burn proofs, which are both regularly published by the mint operator. Third, a mint publicly commits to rotate its keys regularly once each epoch and allows all ecash in circulation to recycle from old epochs to the newest one. If clients remain vigilant and mints agree on a certain set of rules of operation which are publicly verifiable, users of a mint can detect whether a cheating mint has printed unbacked ecash during a past epoch, and, in many cases, provide public proofs of the mint engaging in this adversary behavior. Users achieve this by regularly checking t

@fearsum-fyz
fearsum-fyz / fyz.sty
Last active September 19, 2025 04:31
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fyz}[2025/09/18 v1.0 pink kawaii theme]
\RequirePackage[utf8]{inputenc}
\RequirePackage{tikz}
\RequirePackage{enumitem}
\RequirePackage{titlesec}
\RequirePackage{amsmath, amssymb, amsthm}
\RequirePackage[most]{tcolorbox}
\RequirePackage{xcolor}
@dknauss
dknauss / psudo.php
Last active September 19, 2025 04:25
"Psudo" is a "pseudo sudo" mode for WordPress administrators: it requires reauthentication to perform sensitive admin tasks for a short window of time. (This overgrown gist is due to become a real plugin.)
<?php
/**
* == Psudo ==
*
* Plugin Name: Psudo
* Version: 1.0
* Author: Dan Knauss
* Contributors:
* Donate link: https://example.com/
* Tags: security, user management
# adapted from https://gist.github.com/johdax/771943
# modified to work without creating new String methods
class StringDistance
def self.damerau_levenshtein(str1, str2)
d = Array.new(str1.size+1){Array.new(str2.size+1)}
for i in (0..str1.size)
d[i][0] = i
end
for j in (0..str2.size)