Skip to content

Instantly share code, notes, and snippets.

@echo off
:init
setlocal DisableDelayedExpansion
set "batchPath=%~0"
for %%k in (%0) do set batchName=%%~nk
set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"
setlocal EnableDelayedExpansion
:checkPrivileges
@AlessGoss
AlessGoss / TwitterUncheckInterests.js
Last active December 25, 2022 18:52
This script will uncheck all Twitter interests (https://twitter.com/settings/your_twitter_data/twitter_interests), so that you don't have to do it manually.
/*
Unless your mobile browser has developer tools including the JavaScript console, you must use a PC.
Go to "https://twitter.com/settings/your_twitter_data/twitter_interests", open developer tools (in most cases, you can press F12 for that), go to "Console" and then paste the code below (starting from line 8). Press [ENTER] to run the script.
Just wait, and if you see some errors and/or that you notice (almost) all checkboxes are unchecked, that means the script worked (and may have finished its job). :)
WARNING: The script was created on April 18th, 2022 and was last updated on December 25th, 2022, meaning it could no longer work anytime later!
*/
if (window.location.href.startsWith("https://twitter.com/settings/your_twitter_data/twitter_interests")) {
var c = document.getElementsByClassName("r-1p0dtai");
var l = c.length;
@AlessGoss
AlessGoss / ArgCount.bat
Last active June 10, 2022 16:17
This batch file will count the arguments (A.K.A. parameters) given to it.
@echo off
echo Counting arguments...
set arg1=%1
set arg2=%2
set arg3=%3
set arg4=%4
set arg5=%5
set arg6=%6
set arg7=%7
set arg8=%8
@AlessGoss
AlessGoss / GuessMyNumber.bat
Created July 5, 2021 13:35
Guess My Number Game
@echo off
:new
rem set number=%random%
set number=1
:start
set /p choice="Guess my number! "
if "%choice%"=="exit" (goto null)
if "%choice%" GTR "%number%" (echo Lower & goto start)
if "%choice%" LSS "%number%" (echo Higher & goto start)
if "%choice%"=="%number%" (echo You did it! & choice /c YN /m "Do you want to play again")