This file contains 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
#!/usr/bin/env python | |
import os | |
import ctypes | |
from ctypes import CDLL | |
import sys | |
import random | |
import string | |
from errno import EEXIST | |
# C stuff | |
libc = CDLL('libc.so.6', use_errno=True) |
This file contains 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
#!/usr/bin/env python | |
from functools import wraps | |
class Interpolation: | |
def __init__(self, getvalue): | |
self.getvalue = getvalue | |
def eager_tag(func): | |
@wraps(func) | |
def wrapper(*args): |
This file contains 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
#!/usr/bin/env python | |
# Novel code (of which there is almost none) is under The Unlicense | |
# the C# runtime code this file copies from is | |
# https://github.com/dotnet/runtime/blob/5535e31a712343a63f5d7d796cd874e563e5ac14/LICENSE.TXT | |
# The decompiled C# code this file copies parts from is owned by https://x.com/eggHatcherGame | |
# And is unfortunately used here without permission. | |
import json | |
import sys | |
import io |
This file contains 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
#!/usr/bin/env bash | |
p () { | |
declare USAGE="${FUNCNAME[0]} [-h] [-0] [--] [ARGS ...]" | |
declare NL='\n' | |
declare -i OPTIND=1 | |
while getopts h0 OPT; do | |
case "$OPT" in | |
'h')printf 'Usage: %s\n' "$USAGE";return;; | |
'?')printf 'Usage: %s\n' "$USAGE">&2;return 1;; |
This file contains 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
APPNAME=exchange.sh | |
p () { printf '%s\n' "$@";} | |
: "${XDG_CACHE_HOME:=$HOME/.cache}" | |
cachedget () { | |
URL=$1 | |
CACHEDIR="$XDG_CACHE_HOME/$APPNAME/curl/GET-$(base64 -w0 <<< "$URL")" | |
mkdir --parents "$CACHEDIR" | |
curl -sS \ |
This file contains 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
const filters = [ | |
/^Running script with [0-9]+ thread\(s\), pid [0-9]+ and args/, | |
] | |
function findProp(propName) { | |
// stolen from talamond | |
for (let div of eval("document").querySelectorAll("div")) { | |
let propKey = Object.keys(div)[1]; | |
if (!propKey) | |
continue; |
This file contains 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 shuffleArray(array) { | |
for (let i = array.length - 1; i > 0; i--) { | |
const j = Math.floor(Math.random() * (i + 1)); | |
[array[i], array[j]] = [array[j], array[i]]; | |
} | |
return array | |
} | |
/** @param {NS} ns **/ | |
export async function main(ns) { | |
let args = ns.flags([ |
This file contains 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
#!/usr/bin/env bash | |
DATADIR=$(pwd) | |
TEMPDIR= | |
trap 'cd ~;rm -fr -- "$TEMPDIR"' EXIT | |
TEMPDIR=$(mktemp -d) | |
cd -- "$TEMPDIR" | |
mkdir {html,json}{-compressed,-dictionary,} |
NewerOlder