Skip to content

Instantly share code, notes, and snippets.

View gekkedev's full-sized avatar
tsek

gekkedev

tsek
View GitHub Profile
@gekkedev
gekkedev / guide.md
Last active July 21, 2024 18:00
Cross-browser userscript installation guide - how to install userscripts

Click on Raw, then copy and paste. Crediting is highly appreciated. Else you may link to this guide to ensure your instructions stay up-to-date regularly.

Google Chrome: Install Violentmonkey or Tampermonkey.
Mozilla Firefox: Install Greasemonkey, or Violentmonkey, or Tampermonkey.
Opera: Install this extension first, then you can install Violentmonkey or Tampermonkey from the Chrome extension store.
Microsoft Edge: Install Violentmonkey or [

@gekkedev
gekkedev / update_factorio.sh
Last active December 20, 2021 18:23
Factorio server installer/updater
#navigate into the directory where you installed the game and run it with your game' folder name as first argument, e.g. "factorio":
#bash update_factorio.sh factorio
#cd /opt
if [[ $1 ]]
then
wget https://factorio.com/get-download/stable/headless/linux64 -O update.tar.$
mkdir -p $1
echo "Extracting, please wait..."
tar -xf update.tar.xz factorio -C $1
@gekkedev
gekkedev / assert-min-node-version.js
Created July 21, 2024 20:00
Assert a minimum Node.js version
//asset the right Node.js version for compatibility (see http://node.green)
const requiredMajorVersion = 18
/** extracted major version number from the full version string */
const majorVersion = parseInt(process.version.split(".")[0].replace("v", ""), 10)
if (majorVersion < requiredMajorVersion) {
console.error(
`Node.js version ${process.version} is too low. Please upgrade to version ${requiredMajorVersion} or higher.`
)
process.exit(1)
} else console.log(`Node.js version ${process.version} is sufficient.`)
@gekkedev
gekkedev / iphone_refurbishing_checklist.md
Last active November 19, 2024 12:34
iPhone refurbishing checklist

Apple iPhone refurbishing checklist

Let's assume you bought a used iPhone or just finished fixing an iPhone: This checklist will guide you through each step and help ensure you cover all essential refurbishment aspects within ~an hour.


1. Initial Assessment

  • model name (i.e. iPhone XY A1234) : _______
  • color
  • Space gray
@gekkedev
gekkedev / extract-whatsapp-admins.js
Created November 19, 2024 17:13
Extract all admins from a WhatsAppgroup via WhatsApp Web
// 1. Log in to WhatsApp Web (http://web.whatsapp.com)
// 2. Download https://github.com/wppconnect-team/wa-js/releases/download/nightly/wppconnect-wa.js
// 3. Open the file and copy its contents.
// 4. Navigate back to WhatsApp Web and press F12
// (*allow pasting* if necessary)
// 5. paste this snippet into the browser console:
WPP.chat.getActiveChat().groupMetadata.participants.getAdmins().map(admin => admin.id.user)
// The output is a string array of international phone numbers without leading zeroes, plus signs, spaces, dashes, slashes, etc.