Skip to content

Instantly share code, notes, and snippets.

View StoneLabs's full-sized avatar
:shipit:
Oh hello there

Satellite girl 🛰️ StoneLabs

:shipit:
Oh hello there
  • Student
  • 14:44 (UTC +09:00)
View GitHub Profile
@StoneLabs
StoneLabs / light-to-dark-pdf.sh
Created June 2, 2026 10:33
PDF: Light to Dark mode
mkdir -p pages
# Render at 600 DPI
pdftoppm -r 600 -png "Light-Mode.pdf" pages/page
# Dark mode conversion
for f in pages/*.png; do
magick "$f" \
-colorspace HSL \
-channel Lightness \
@StoneLabs
StoneLabs / skyblock_clearer.py
Created May 23, 2026 18:44
Minecraft skyblock mca world clearing script
import os
import sys
import struct
import zlib
import gzip
import tempfile
import io
import math
from nbt import nbt
@StoneLabs
StoneLabs / norm_venv.zsh-theme
Created May 15, 2026 04:20
zsh norm theme with venv lambda
PROMPT='%{$fg[yellow]%}λ %m %{$fg[green]%}%c %{$fg[yellow]%}→ $(git_prompt_info)$(hg_prompt_info)$(virtualenv_prompt_info)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}λ %{$fg[blue]%}git %{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}"
ZSH_THEME_HG_PROMPT_PREFIX="{$fg[yellow]%}λ %{$fg[blue]%}hg %{$fg[red]%}"
ZSH_THEME_HG_PROMPT_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}"
ZSH_THEME_VIRTUALENV_PREFIX="%{$fg[yellow]%}λ %{$fg[blue]%}venv %{$fg[red]%}"
ZSH_THEME_VIRTUALENV_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}"
import zipfile, subprocess, re, sys
from pathlib import Path
if len(sys.argv) < 2:
print("Usage: python convert.py <input.odt>")
sys.exit(1)
input_path = sys.argv[1]
if not Path(input_path).exists():
@StoneLabs
StoneLabs / non-ascii-line.regex
Last active February 2, 2024 10:13
Fast Non-Ascii-Line regex
^[^\s]*[^\x00-\x7F][^\s]*$\n # Also remove lines with whitespaces
^[^\n\r]*[^\x00-\x7F][^\n\r]*$\n # Lines may include whitespaces
@StoneLabs
StoneLabs / docker-ips.sh
Last active January 11, 2024 17:17
List All Fixed and Current IPs of all containers in macvlan setup
echo ""
docker container ls --all -q |
xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAMConfig.IPv4Address}}{{end}} | {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} | {{ .Name }}' |
sort |
sed '1 iCustom IP | Current IP | Container\n||' |
column -t -s "|"
@StoneLabs
StoneLabs / accidents.py
Created September 12, 2023 05:56
Find all accident reports on train accidents in japan
with open("wc.lst", "w") as wordlist:
for year in range(2003, 2024):
for month in range(1,13):
for num in range(1, 20):
wordlist.write(f"RA{year}-{month}-{num}\n")
#gobuster fuzz -w wc.lst -u https://www.mlit.go.jp/jtsb/railway/rep-acci/FUZZ.pdf --excludestatuscodes 404 -o out.lst
@StoneLabs
StoneLabs / backup-script.sh
Created April 13, 2023 06:42
Backup script
#!/bin/zsh
#
# Copies all sources to target host
# =================================
#
# Copies all folders in ./sources to the target.
# These folder entries (seperated by newlines)
# should not end with a slash. If they do, only the
# files inside the folder are backed up, not the
# folder itself. Make sure that there are no
@StoneLabs
StoneLabs / view_all_mounts.sh
Created March 15, 2023 18:23
Docker view all mounts and volumes of all containers
docker ps -a --format '{{ .ID }}' | xargs -I {} docker inspect -f '{{ .Name }}{{ printf "\n" }}{{ range .Mounts }}{{ printf "\n\t" }}{{ .Type }} {{ if eq .Type "bind" }}{{ .Source }}{{ end }}{{ .Name }} => {{ .Destination }}{{ end }}{{ printf "\n" }}' {}
@StoneLabs
StoneLabs / script.ps1
Last active April 13, 2023 20:05
Android storage backup script
echo ""
echo ""
echo "====== FILE PULLER ======"
echo ""
echo ""
$index = 0
if (Test-Path ./status) {
$confirmation = $Host.UI.PromptForChoice("", "It appears the last operation was interrupted. Continue?", @("&Continue", "&Restart", "&Exit"), 0)
if ($confirmation -eq 0) {