Skip to content

Instantly share code, notes, and snippets.

@GluTbl
GluTbl / QuickShare.bat
Created June 2, 2025 14:11
[Quick file host] #python
@echo off
cd /d %~dp0
echo Hosting current folder on LAN at port 8000...
python -m http.server 8000
pause
@GluTbl
GluTbl / flush_dns.bat
Created May 27, 2025 15:58
[FLush dns] #bat
@echo off
cls
echo ========================================
echo DNS Flush Utility - Windows
echo ========================================
echo.
set /p userinput=Do you want to flush the DNS cache now? (y/n):
if /i "%userinput%"=="y" (
echo.
@GluTbl
GluTbl / recursive_sha256sum.sh
Last active June 11, 2025 17:32
[Recursive file's sha256sum] #bash #shell
# find . -type f ! -name "*.sha256sum" -exec bash -c 'for f; do echo "Processing: $f"; (cd "$(dirname "$f")" && sha256sum "$(basename "$f")" > "$(basename "$f").sha256sum"); done' _ {} +
# find . -type f ! -name "*.sha256sum" -exec sh -c 'for f; do echo "Processing: $f"; (cd "$(dirname "$f")" && sha256sum "$(basename "$f")" > "$(basename "$f").sha256sum"); done' _ {} +
# find . -type f -name "*.sha256sum" -exec sh -c 'cd "$(dirname "{}")" && sha256sum -c "$(basename "{}")"' \;
# shred \r\n using dos2unix
# find . -type f -name "*.sha256sum" -exec sh -c 'cd "$(dirname "{}")" && echo "Dos2unix > $(dirname "{}")/$(basename "{}")" && dos2unix "$(basename "{}")"' \;
@GluTbl
GluTbl / Dockerfile
Last active May 20, 2025 08:51
[AAXtoMP3 Dockerfile] #docker
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
# Install core dependencies
RUN apt-get update && apt-get install -y \
curl \
bash \
grep \
@GluTbl
GluTbl / menu_selector.py
Created July 6, 2024 03:25
[Qprompt Menu] using menu selection in qprompt #python
import json
from typing import List, Dict, Any
from qprompt import Menu
class QpromptMenu:
def __init__(self, header: str, data: List[Dict[str, Any]], key_to_show):
self._data = data
@GluTbl
GluTbl / usb_power_up.sh
Last active May 22, 2022 05:24
[Power Up usb for Ubuntu] #shell
echo "Usb power status:"
echo ""
sudo cat /sys/bus/usb/devices/*/power/level
echo ""
echo ""
while true; do
read -p "Do you wish to change usb power status? " yn
case $yn in
[Yy]* ) make install; break;;
@GluTbl
GluTbl / install.sh
Created December 1, 2021 11:56
[Setting VNC Server on UBUNTU]
sudo apt update
sudo apt-get install tigervnc-scraping-server
mkdir -p ~/.vnc
vncpasswd
x0vncserver -passwordfile ~/.vnc/passwd -display :0
@GluTbl
GluTbl / README.md
Last active May 18, 2025 15:51
[Mount LUKS encrypted OS]
@GluTbl
GluTbl / test_arduino_gpio.cpp
Created September 18, 2021 16:32
[GPIO arduino test] #arduino
//For digital pins
#define DIGITAL_PIN_COUNT 12
char *digital_pins[] = {"D0", "D1", "D2" , "D3" , "D4" , "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13"};
int *valid_digital_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
////////////////////////
//For Aanlogue pin
#define ANALOG_PIN_COUNT 6
@GluTbl
GluTbl / execute_util.py
Created July 29, 2021 07:56
[Execute shell in python]
import shlex
import subprocess
def execute_command(command: str, path=None):
command_splited = shlex.split(command)
if path is None:
process = subprocess.Popen(command_splited)
else:
process = subprocess.Popen(command_splited, cwd=path)
process.communicate()