Skip to content

Instantly share code, notes, and snippets.

View risknu's full-sized avatar
:dependabot:
~/risknu/readme.txt

risknu risknu

:dependabot:
~/risknu/readme.txt
View GitHub Profile
@risknu
risknu / boot.asm
Created October 2, 2024 18:05
simple assembler program
[BITS 16]
[ORG 0x7C00]
; change video mode to 80x25
mov ah, 0x00
mov al, 0x03
int 0x10 ; call bios
; change boot backgrund color to blue
mov ah, 0x0B
if ! hash python3; then
echo "[!] ERR: python is not installed"
exit 1
fi
ver=$(python3 -V 2>&1 | sed 's/.* \([0-9]\).\([0-9]\).*/\1\2/')
if [ "$ver" -lt "31" ]; then
echo "[!] ERR: This script requires python 3.10 or greater"
exit 1
fi
from __future__ import annotations
from typing import List, Optional
def create_variations(key_word_string: Optional[str] = None) -> Optional[str]:
if key_word_string is None or not isinstance(key_word_string, str):
return None
tmp_variations: List = []
for char_i in range(len(key_word_string)):
tmp_variation_list: list[str] = list(key_word_string)
@risknu
risknu / rmcfetch.sh
Created April 19, 2024 13:43
Check minecraft java server status(latency,online,location)
#!/bin/bash
SERVER_IP=$1
SERVER_PORT=$2
ping_result=$(ping -c 1 -w 1 $SERVER_IP > /dev/null && echo "online" || "offline")
get_latency() {
local latency_output=$(ping -c 1 "$SERVER_IP" -p "$SERVER_PORT" | grep -oP 'time=\K\d+(.\d+)?')
echo "$latency_output"