Skip to content

Instantly share code, notes, and snippets.

@VictorTaelin
VictorTaelin / spec.md
Created February 26, 2025 15:51
SupTT Spec

The Interaction Calculus

The Interaction Calculus (IC) is term rewriting system inspired by the Lambda Calculus (λC), but with some major differences:

  1. Vars are affine: they can only occur up to one time.
  2. Vars are global: they can occur anywhere in the program.
  3. There is a new core primitive: the superposition.

An IC term is defined by the following grammar:

I'm using svelte 5 instead of svelte 4 here is an overview of the changes.

Overview

Svelte 5 introduces runes, a set of advanced primitives for controlling reactivity. The runes replace certain non-runes features and provide more explicit control over state and effects.

$state

  • Purpose: Declare reactive state.
  • Usage:
@ayamkv
ayamkv / yt-fomo.py
Last active May 26, 2024 12:43
(deprecated) Youtube Your Most Liked Comment (Google Takeout)
import re
from pyyoutube import Api
import csv
# Google Developer Console, Youtube Data API V3
api = Api(api_key='YOUR_API_KEY')
# Your Google Takeout file
file = open('my-comments.html', 'r', encoding='utf8')
lines = file.readlines()
comments = [[], []]
@icecore2
icecore2 / google_forms_autofill.py
Created June 1, 2020 06:54
This script is for filling the google forms automatically by entry ID and value. This includes Date, ID and Full name, need modify only the ID and the Full name between the brackets.
''' This script is for filling the google forms automatically by entry ID and value.
This includes Date, ID and Full name, need modify only the ID and the Full name between the brackets.
'''
import requests
from datetime import datetime
url = 'https://docs.google.com/forms/d/<ID>/formResponse' # Change the ID to a proper one
date = datetime.now()
@brainfucksec
brainfucksec / bash.bashrc
Last active November 8, 2024 13:01
Termux bash.bashrc
######################################
#
# Termux bash.bashrc
# by brainf+ck
#
# Last modified: 2022/06/30
#
######################################
#### Global ##########################
@mjnaderi
mjnaderi / android_storage_ssh.md
Last active February 21, 2025 02:45
Access Android Storage Remotely using Termux and SSH
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active March 30, 2025 17:14
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="description" content="Simple weight converter">
<title>Weight Converter</title>
@ipmb
ipmb / ratelimit.nginxconf
Last active July 21, 2024 05:37
Nginx reverse proxy with rate limiting
upstream myapp {
server 127.0.0.1:8081;
}
limit_req_zone $binary_remote_addr zone=login:10m rate=1r/s;
server {
listen 443 ssl spdy;
server_name _;