Skip to content

Instantly share code, notes, and snippets.

View binarymax's full-sized avatar
👻
for(;1;){work();eat();rest();}

Max Irwin binarymax

👻
for(;1;){work();eat();rest();}
View GitHub Profile
// // https://twitter.com/settings/your_twitter_data/twitter_interests
// Lots of discussion and improvement of the original script in the comments
// Here's the best version that works well
// Because Twitter stops the script working after unchecking 50 interests, so you will almost certainly have to run the script multiple times
function sleep(milliseconds) {
return new Promise(function (resolve) {
return setTimeout(resolve, milliseconds);
});
@IanColdwater
IanColdwater / twittermute.txt
Last active April 14, 2025 16:31
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@prologic
prologic / LearnGoIn5mins.md
Last active February 12, 2025 06:52
Learn Go in ~5mins
@Filimoa
Filimoa / app.py
Last active March 9, 2025 07:50
FastAPI Stripe Checkout
"""
Based off Stripe's checkout repo, see the link for the Flask analogue.
https://github.com/stripe-samples/checkout-one-time-payments/blob/master/server/python/server.py
Assumes project is structured like:
src/
backend/
app.py
@hwayne
hwayne / 01-dreidel.prism
Last active December 19, 2024 17:37
Dreidel modeling
// dreidel model I wrote in 2023.
// see https://buttondown.com/hillelwayne/archive/i-formally-modeled-dreidel-for-no-good-reason/
dtmc
const int M; //starting money
formula Players = 4; //Players
formula maxval = M*Players;
formula done = (p1=0) | (p2=0) | (p3=0) | (p4=0);
formula halfpot = ceil(pot/2);
@hanxiao
hanxiao / testRegex.js
Last active May 13, 2025 09:48
Regex for chunking by using all semantic cues
// Updated: Aug. 20, 2024
// Run: node testRegex.js whatever.txt
// Live demo: https://jina.ai/tokenizer
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0)
// COPYRIGHT: Jina AI
const fs = require('fs');
const util = require('util');
// Define variables for magic numbers
const MAX_HEADING_LENGTH = 7;