Skip to content

Instantly share code, notes, and snippets.

View Staninna's full-sized avatar
🦀
Getting rusty

Stan Staninna

🦀
Getting rusty
  • Netherlands
View GitHub Profile
// ==UserScript==
// @name Auto-Retry (DS Style)
// @namespace http://tampermonkey.net/
// @version 0.5
// @description Automatically click the retry button when DS message blocks show "The server is busy. Please try again later." or "Thought for 0 seconds". Uses a cooldown so that repeated clicks occur if the error persists.
// @author Staninna
// @match https://chat.deepseek.com/*
// @grant none
// ==/UserScript==

Multiplayer Game Protocol Requirements and Design Document (Revised)

1. Overview

This protocol provides a modular, secure, and real‑time communication mechanism for multiplayer turn‑based games. Its design enables rapid setup for both simple games (e.g., Tic Tac Toe) and complex games (e.g., Chess). Key features include:

  • Dynamic (“Rolling”) Topics:
    Topics are computed dynamically for each game round using a cryptographic hash function on a round number and a secret seed. The seed disclosure is controlled—initially only its hash is published, and it is revealed later in a server‑controlled manner. This prevents outsiders from predicting or preempting game channels.

  • Ephemeral (Per‑Game) Keys:

PREPARATION:

  1. Activate mob switch (no Warden/mobs will spawn)

RAID PROCESS PER CITY:

  1. Travel via nether to target city
  2. Build portal on surface
  3. Place beds next to portal as respawn points
  4. Create ender pearl stasis chamber system
  5. Dig down to ancient city
  6. Make water drop shaft
@Staninna
Staninna / jina-cli.sh
Last active November 13, 2024 10:04
bash scripts
#!/bin/bash
JINA_CONFIG_DIR="$HOME/.config/jina"
JINA_STATS_FILE="$JINA_CONFIG_DIR/stats.json"
JINA_CACHE_FILE="$JINA_CONFIG_DIR/cache.json"
CACHE_TTL=3600 # Cache validity in seconds (1 hour)
declare -A JINA_KEY_USAGE
setup_directories() {
mkdir -p "$JINA_CONFIG_DIR"
@Staninna
Staninna / jina-cli.sh
Created October 25, 2024 09:24
Jina cli bash script for multiple api keys
#!/bin/bash
#######################
# Jina CLI Tool
# Save as ~/.local/bin/jina-cli.sh
#######################
#######################
# Configuration
#######################
@Staninna
Staninna / idea.md
Last active March 28, 2024 23:48
Twitch chat
@Staninna
Staninna / index.html
Last active December 12, 2023 12:18
Narrowblast bidirectional communication draft
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello World with Slides and Interaction</title>
</head>
<body>
@Staninna
Staninna / cracker-v1.js
Last active November 22, 2023 21:16
https://oldmartijntje.nl Clicker-game save cracker
// This version works on this version of the site <https://github.com/oldmartijntje/playtime/tree/c67261f1f53570cf737f0711bcae66c112e17155>
class Encryptor {
stringToAsciiList(str) {
const asciiList = [];
for (let i = 0; i < str.length; i++) {
const asciiValue = str.charCodeAt(i);
asciiList.push(asciiValue);
}
return asciiList;
@Staninna
Staninna / _get_xrandr_command
Last active July 5, 2022 23:05
`autoxrandr` is the main script `_get_xrandr_command` is a helper script
#!/usr/bin/python3
# Modified from https://gitlab.com/arandr/arandr and put all necessary things in 1 file
# Still recommended to use arandr to set the configurations to save/load
from math import pi
import os
import subprocess
from functools import reduce
import warnings