This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // gcc -m32 -o inode_probe inode_probe.c | |
| // ./inode_probe /mnt/c/some/dir | |
| #define _LARGEFILE64_SOURCE | |
| #include <dirent.h> | |
| #include <errno.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <sys/stat.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import atexit | |
| import ctypes | |
| import re | |
| import shutil | |
| import sys | |
| from pathlib import Path | |
| DEFAULT_DLL = Path(r"C:\Program Files (x86)\BYOND\bin\byondcore.dll") | |
| # older builds don't have a null-check, and would still crash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static THRESHOLD_SPLIT_REGEX: Lazy<Regex> = Lazy::new(|| { | |
| Regex::new(r"(?im)(<br>|([^:]<b>))[^$]").expect("failed to setup THRESHOLD_SPLIT_REGEX") | |
| }); | |
| static THRESHOLD_PARSE_REGEX: Lazy<Regex> = Lazy::new(|| { | |
| Regex::new(r"(?im)(?:<b>)?(?P<name>[[[:alpha:]] ]+) ?(?P<level>[[:digit:]]{1,2})?[[:space:]]?(?:</b>[[:space:]]*|:</b>[[:space:]]*)(?P<desc>[^<>\n]+)").expect("failed to setup THRESHOLD_PARSE_REGEX") | |
| }); | |
| static SEVERITYSET_PROC_PARSE_REGEX: Lazy<FancyRegex> = Lazy::new(|| { | |
| FancyRegex::new( | |
| r"(?mxi) # setup flags | |
| (?P<severityset> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * This is a stub for the rust-g DLL, implemented in pure DM. | |
| * It implements whatever functions were somewhat trivial to implement. | |
| * Everything else just returns null and logs "UNIMPLEMENTED STUB: rustg_func_name" to world.log. | |
| * | |
| * This has been tested and can initialize + run on /tg/station code as of 1/4/2025 (commit 2df30547c27) | |
| * Don't use this in production. The only reason this exists is to help Lummox reproduce bugs in SS13 codebases easier. | |
| * | |
| * You may need to also comment out a url_encode/decode override define in some codebases, usually in rust_g_overrides.dm or something. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /********************************************************************************/ | |
| /* DON'T USE THIS, I REWROTE IT WITH BETTER CODE AND LINUX SUPPORT: */ | |
| /* https://github.com/Absolucy/byond-memorystats */ | |
| /********************************************************************************/ | |
| #ifndef __clang__ | |
| #error use clang to compile this graaaah | |
| #endif | |
| #include <stdio.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string", | |
| "description": "The title of the cassette tape." | |
| }, | |
| "desc": { | |
| "type": "string", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Remove-Unused-Branches { | |
| $refsToDelete = git for-each-ref --format '%(refname:short) %(upstream:track)' | | |
| ForEach-Object { | |
| $ref, $upstream = $_ -split '\s+' | |
| if ($upstream -eq '[gone]') { | |
| Write-Output $ref | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| TMP_SUFFIX=".rate-mirrors" | |
| MIRROR_FOLDER="/etc/pacman.d/mirrors" | |
| PROTOCOLS="https" | |
| TIMEOUT_MS="5000" | |
| [ -d "${MIRROR_FOLDER}" ] || sudo mkdir -p "${MIRROR_FOLDER}" | |
| TMPDIR="$(mktemp --directory --suffix "${TMP_SUFFIX}")" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cv2 | |
| import numpy as np | |
| import subprocess | |
| import sys | |
| import os | |
| # the pixels to check | |
| pixel_positions = [(1615, 727), (1705, 728)] # example positions | |
| # the minimum color value to check for (in BGR) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install obs-websocket-py psutil colorlog pystray pillow | |
| import json | |
| import psutil | |
| import os | |
| import shutil | |
| import threading | |
| from colorlog import ColoredFormatter, StreamHandler | |
| from logging import INFO, getLogger | |
| from obswebsocket import obsws, requests as obsreq | |
| from time import sleep, time |
NewerOlder