Code Snippets Batchfile

Short texts Batchfile 🧑‍💻 Code snippets Batchfile ✍️ Reading lists Batchfile 👀

Grabs public metadata from any visible Minecraft server. Run with JQ and CURL in the current directory. Creates a file called latest.json in the current directory with the output json block.

@echo off rem ### REQUIRES JQ AND CURL IN THE SAME DIRECTORY TO WORK ## title ZombieB’s Minecraft Server Metadata Grabber :start cls echo ZombieB’s Minecraft Server Metadata Grabber echo Type the server address here. set /p address= curl https://api.mcsrvstat.us/2/%address% –output latest.json>nul jq . latest.json pause>nul goto start

nordvpn-set-mtu.bat

@echo off net session >nul 2>&1 if %errorLevel% neq 0 ( echo ERROR: Run again with admin privileges. exit 1 ) netsh interface ipv4 set subinterface “NordLynx” mtu=1300 store=persistent netsh interface ipv4 show subinterfaces “NordLynx”

aws-subnet-usage.cmd

aws ec2 describe-network-interfaces –filters “Name=subnet-id,Values=[subnet-id]” –query “NetworkInterfaces[*].[PrivateIpAddress,Description]”

How to Reset InteIIiJ IDEA Evaluation Key in Windows

cd “cd %APPDATA%\JetBrains\IntelliJIdea*” rmdir “eval” /s /q del “options\other.xml” reg delete “HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\idea” /f :: This will work for idea 2020.* :: :: It is Highly Advised to Purchase the JetBrain Softwares :: This is only for the case You just want to Extend the :: Trial Period and Evaluate the IDE for some more Time

Running PM2 as a window service

{ “apps”: [ { “name”: “web”, “script”: “C:\\ws\\engineer\\titan-web\\app.js”, “args”: [], “cwd”: “C:\\ws\\engineer\\titan-web”, “merge_logs”: true, “instances”: 1, “exec_mode”: “cluster_mode”, “env”: { “NODE_ENV”: “production” } }, { “name”: “com”, “script”: “C:\\ws\\engineer\\titan-com\\index.js”, “args”: [], “cwd”: “C:\\ws\\engineer\\titan-com”, “merge_logs”: true, “instances”: 1, “exec_mode”: “cluster_mode”, “env”: { “NODE_ENV”: “production” } } ] } Commands to remember: – start/stop/list components (eg: `pm2 […]