This document is about the Minecraft mods Sodium and Lithium, and their forks. These are mods to help performance.
Sodium optimizes the client rendering pipeline. It does nothing for the server.
#!/usr/bin/env python | |
""" | |
This script shows the individual size changes of upgradable packages in Arch Linux. | |
You can use it to understand, e.g. why your upgrade size is negative. | |
""" | |
import typing | |
import subprocess | |
import sys |
# Make a breakpoint when a certain text is written to stdout | |
# Note: only work with C/C++ binaries | |
set width 0 | |
set height 0 | |
set verbose off | |
# Modify this to search for a different string | |
# Case sensitive | |
set $STR_SEARCH = "hello world" |
""" | |
Reads stdin from the user console and stops input with Ctrl+C. Also support piped stdin. | |
Works only on Linux (and maybe MacOS ?) | |
""" | |
import sys | |
import os | |
import time | |
import fcntl | |
def read_user_stdin() -> bytes: |
#include<stdlib.h> | |
#include<stdio.h> | |
#define bool short | |
#define false 0 | |
#define true 1 | |
bool my_contains(char *charset, char c) { | |
for (int i = 0; charset[i] != '\0'; i++) { | |
if (charset[i] == c) { |
#!/usr/bin/env python3 | |
# Simple monitoring script to print processes being created/stopped in real-time | |
import time | |
from typing import Optional | |
import psutil | |
import shutil | |
import sys | |
import argparse |
#!/bin/sh | |
get_running_processes() { | |
processes=$(ps -eo ppid,pid,cmd) | |
echo "$processes" | | |
grep -v "\[.*\]" | # Filter out kernel processes | |
awk -v pid="$$" '$1 != pid' | # Remove children of current script | |
awk '{print $1 " " $2 " " $3}' | # Remove ppid + command params | |
sort | |
} |
#!/usr/bin/env python3 | |
import tiktoken | |
import sys | |
if len(sys.argv) == 1: | |
print(f"Syntax: {sys.argv[0]} <file>") | |
exit(1) | |
enc = tiktoken.get_encoding("cl100k_base") |
import subprocess | |
from typing import Tuple | |
def run_cmd(cmd: str) -> Tuple[int, str]: | |
p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | |
output, _ = p.communicate() | |
return p.returncode, output.decode("utf-8") | |
print(run_cmd("ls /")) | |
print(run_cmd("ls /does-not-exist")) |
#!/usr/bin/env python3 | |
RESET='\033[0m' | |
COLOR='\033[0;36m' # Cyan | |
# List from https://javaalmanac.io/bytecode/versions/ | |
JAVA_TO_BYTECODE = { | |
1.0: 45.0, | |
1.1: 45.3, | |
1.2: 46.0, |