Skip to content

Instantly share code, notes, and snippets.

Avatar

Spinelli Valentinuzzi ileathan

View GitHub Profile
@ileathan
ileathan / test.sh
Created Oct 12, 2021
Aurora coverart restore / sharing
View test.sh
set -o errexit -o nounset
# The idea is simple, the format Aurora uses is #GameID_DatabaseID where the GameID stays the same and the DatabaseID changes, so we check only the first 8 chars of the backup and the new and if they match we copy over the backups cover file to the new gamedata.
for file in GameData.bak/*; do
# Remove the following as they arnt games?
for file2 in GameData/*; do
if [ "${file2:9:8}" == "00000000" ]; then
continue
fi
if [ "${file2:9:2}" == "FF" ]; then
@ileathan
ileathan / Win10Activation.txt
Created Dec 7, 2020 — forked from Dhanvesh/Win10Activation.txt
Windows 10 Activation Batch File
View Win10Activation.txt
@echo off
title Windows 10 ALL version activator&cls&echo ************************************&echo Supported products:&echo - Windows 10 Home&echo - Windows 10 Professional&echo - Windows 10 Enterprise, Enterprise LTSB&echo - Windows 10 Education&echo.&echo.&echo ************************************ &echo Windows 10 activation...
cscript //nologo c:\windows\system32\slmgr.vbs /ipk TX9XD-98N7V-6WMQ6-BX7FG-H8Q99 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 3KHY7-WNT83-DGQKR-F7HPR-844BM >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk PVMJN-6DFY6-9CCP6-7BKTT-D3WVR >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk MH37W-N47XK-V7XM9-C7227-GCQG9 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk NW6C2-QMPVW-D7KKK-3GKT6-VCFB2 >nul
@ileathan
ileathan / android-man-install.sh
Last active Jan 29, 2018
Install man pages without or with conflicting binaries
View android-man-install.sh
#!/bin/bash
# This script assumes you have an ssh server running on your rooted android.
# USAGE:
# ./android-man-install.sh binaryName
# Locate the man page you want. From a computer that already has it:
location=$(sudo find / * | grep -P "$1\\..*\\.gz")
# Now scp over the file you just found (from remote pc to android).
scp $location yourAndroidDevice:$location
@ileathan
ileathan / remote-sudo.sh
Last active Jan 29, 2018
Run sudo command on remote machine non-interactively
View remote-sudo.sh
#!/bin/bash
# USAGE:
# ./remote-sudo.sh password hostname command
HOST=$2;
PASSWORD=$1;
COMMAND="${@:3}"
ssh -T $HOST "echo $PASSWORD | sudo -S su -c \"$COMMAND\""
@ileathan
ileathan / base-x encoder gist
Last active Jan 29, 2018
Continually mod and map.
View base-x encoder gist
encode = (n, a) => {
var r = [];
do {
n = (n - (r[r.length] = n % a.length)) / a.length
} while(n);
return r.map(n=>a[n]).reverse().join('')
};
encode(4095, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/')
// Outputs "//"
View Turn it all true
true|0**0 === 1; // true
NaN|0**0 === 1; // true
false|0**0 === 1; // true
// ...
View Javascript ES6 private scope
add=(_=>n=>_+=n)(0)
add(5) // => 5
add(10) // => 15
add(7) // -> 22