Skip to content

Instantly share code, notes, and snippets.

@Rhomboid
Rhomboid / mersenne_predict.py
Last active July 30, 2024 00:24
Predict output of Mersenne Twister after seeing 624 values
#!/usr/bin/env python
#
# Mersenne Twister predictor
#
# Feed this program the output of any 32-bit MT19937 Mersenne Twister and
# after seeing 624 values it will correctly predict the rest.
#
# The values may come from any point in the sequence -- the program does not
# need to see the first 624 values, just *any* 624 consecutive values. The
# seed used is also irrelevant, and it will work even if the generator was
@ChuckMichael
ChuckMichael / vcredistr.md
Last active June 17, 2025 11:29
Visual C++ Redistributable Packages
from typing import List
import queue
from fastapi import FastAPI, WebSocket, WebSocketDisconnect
from fastapi.responses import HTMLResponse
from apscheduler.schedulers.asyncio import AsyncIOScheduler
app = FastAPI()
app.queue_system = queue.Queue()
app.queue_limit = 5
@YoraiLevi
YoraiLevi / KnownFolderPathPS5.ps1
Last active April 16, 2025 19:36
Change windows user folders with powershell
<#
.SYNOPSIS
Requires powershell 5 or later
Provides Get and Set functions for KnownFolders
.EXAMPLE
PS> Set-KnownFolderPath Desktop $ENV:USERPROFILE/Desktop
.EXAMPLE
PS> $Path=""
PS> Get-KnownFolderPath Desktop ([ref]$Path)
.LINK
@jexp
jexp / dependencies.cypher
Last active January 5, 2023 13:09
Google deps.dev to #Neo4j graph on dev.neo4j.com/sandbox
// load initial package, adjust your name and version
with "org.neo4j:neo4j-kernel" as name, '4.2.6' as version
call apoc.load.json("https://deps.dev/_/s/maven/p/"+name+"/v/"+version+"/dependencies") yield value
where value.package.system = 'MAVEN'
merge (p:Package:Maven {name:value.package.name, version:value.version})
with *
unwind value.dependencies as dep
with p, dep where dep.package.system = 'MAVEN'
merge (d:Package:Maven {name:dep.package.name, version:dep.version})
@irazasyed
irazasyed / outbound-email-with-cloudflare.md
Last active June 20, 2025 08:50
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail