Skip to content

Instantly share code, notes, and snippets.

/**
* This script automates the process of unblocking your own blocked Instagram users list.
* It unblocks users one-by-one to avoid hitting rate limits or breaking the page.
*
* WARNING: This function directly manipulates the DOM and depends on the current HTML
* structure of Instagram's website to work. If Instagram implements changes to the
* activity page layout, structure, or functionality, this script may break or cause
* unexpected behavior. Use at your own risk and always review code before running it.
**/
/**
* This script automates the process of deleting your own Instagram saved posts.
*
* Tested on 12429 posts - around 4h non-stop working script on the background tab. Result: Success! 0 saved.
*
* WARNING: This function directly manipulates the DOM and depends on the current HTML
* structure of Instagram's website to work. If Instagram implements changes to the
* activity page layout, structure, or functionality, this script may break or cause
* unexpected behavior. Use at your own risk and always review code before running it.
*
/**
* This script automates the process of deleting your own Instagram likes.
* It deletes comments in batches to avoid hitting rate limits or breaking the page.
*
* WARNING: This function directly manipulates the DOM and depends on the current HTML
* structure of Instagram's website to work. If Instagram implements changes to the
* activity page layout, structure, or functionality, this script may break or cause
* unexpected behavior. Use at your own risk and always review code before running it.
*
* How to use:
@gerwld
gerwld / gist:6c733026f9f3576a7b5450e98b8915ec
Created December 8, 2024 09:55
Trigger any event placed in IIFE / etc
const element = temp1;
// Create a 'mouseenter' event
const event = new MouseEvent('mouseover', {
bubbles: true, // Ensures the event bubbles up (if needed)
cancelable: true, // Allows the event to be canceled
view: window // Links the event to the window object
});
// Dispatch the event on the element
@gerwld
gerwld / typescriptreact.json
Last active March 14, 2025 17:55
Snippets for Typescript React
// To open and edit javascriptreact.json in VS Code:
// Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) to open the Command Palette.
// Type Preferences: Configure User Snippets and select it.
// Choose javascriptreact.json from the list.
{
"Add Styles Import": {
"prefix": "ims",
"body": ["import style from './style.module.css';"],

Several key techniques and best practices to help make JavaScript run extremely fast. Some of these involve optimizing how you handle objects, memory, and data structures, as well as leveraging modern JavaScript engine optimizations. Here are some key points:

1. Use Object.create(null) for Pure Maps/State Objects

  • When you create objects using {}, they inherit from Object.prototype, which can introduce unnecessary properties and methods. Using Object.create(null) creates an object with no prototype, making it a cleaner and faster option for objects used purely as maps or state stores. This reduces overhead from the prototype chain.

2. Avoid Creating Objects in Loops

  • Repeatedly creating objects inside a loop can lead to excessive memory allocations and garbage collection. Instead, reuse objects where possible or move object creation outside the loop.

3. Minimize the Use of Closures in Performance-Critical Code

  • While closures are powerful, they can sometimes lead
@gerwld
gerwld / instagram-likes-activity-deleter.js
Last active September 12, 2024 20:01
Instagram Likes Activity Deleter: Automate the deletion of all your Instagram likes from the 'Your Activity' section. Perfect for quick digital clean-up.
/**
* This script automates the process of deleting your own Instagram likes.
* It deletes comments in batches to avoid hitting rate limits or breaking the page.
*
* WARNING: This function directly manipulates the DOM and depends on the current HTML
* structure of Instagram's website to work. If Instagram implements changes to the
* activity page layout, structure, or functionality, this script may break or cause
* unexpected behavior. Use at your own risk and always review code before running it.
*
* How to use:
@gerwld
gerwld / instagram-comment-activity-deleter.js
Last active January 1, 2025 01:49 — forked from sbolel/instagram-comment-activity-deleter.js
Instagram Comment Activity Deleter: Automate the deletion of all your Instagram comments from the 'Your Activity' section. Perfect for quick digital clean-up.
/**
* This script automates the process of deleting your own Instagram comments.
* It deletes comments in batches to avoid hitting rate limits or breaking the page.
*
* WARNING: This function directly manipulates the DOM and depends on the current HTML
* structure of Instagram's website to work. If Instagram implements changes to the
* activity page layout, structure, or functionality, this script may break or cause
* unexpected behavior. Use at your own risk and always review code before running it.
*
* How to use:
@gerwld
gerwld / .zshrc
Last active September 28, 2024 15:31
zsh config base
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
# Path to Oh My Zsh installation & source
export ZSH="$HOME/.oh-my-zsh"
source $ZSH/oh-my-zsh.sh
# Path to Android SDK, platform-tools, commandlinetools
export ANDROID_HOME=/usr/local/share/android-commandlinetools
@gerwld
gerwld / adobe_cc.md
Created August 26, 2024 08:39 — forked from gadzhimari/adobe_cc.md
Completely Remove Adobe from your Mac in 2 Steps

Step 1

Download and run the Adobe Creative Cloud Cleaner Tool, their multi-app uninstaller and wipe assistant. Adobe does recommend running individual application uninstallers first, your call. Click the Clean All option.

Step 2

Type a one line command in terminal find ~/ -iname "*adobe*" and it's shows up all files which match pattern.

To remove all files

`sudo rm -rf /Applications/Adobe* /Applications/Utilities/Adobe* /Library/Application\ Support/Adobe /Library/Preferences/com.adobe.* /Library/PrivilegedHelperTools/com.adobe.* /private/var/db/receipts/com.adobe.* ~/Library/Application\ Support/Adobe* ~/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.adobe* ~/Library/Application\ Support/CrashReporter/Adobe* ~/Library/Caches/Adobe ~/Library/Caches/com.Adobe.* ~/Library/Caches/com.adobe.* ~/Library/Cookies/com.adobe.* ~/Library/Logs/Adobe* ~/Librar