This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex'); console.log(token); }); | |
| // or | |
| node -e "console.log(require('crypto').randomBytes(64).toString('hex'))" | |
| // or | |
| openssl rand -base64 32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This part injects element before DOMContentLoaded event, | |
| * and reaplies it each time React / Other framework rerenders the parent component. | |
| * | |
| * @returns void | |
| */ | |
| ;(() => { | |
| let observer; | |
| function injectButton() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (() => { | |
| function injectButton(parent) { | |
| if (parent.querySelector(".pf_lb2")) return; // Prevent duplicates | |
| const wrapper = document.createElement("div"); | |
| wrapper.innerHTML = `<!-- CONTENT -->`; | |
| parent.prepend(wrapper); | |
| } | |
| function waitForReactElement(attempts = 0, maxAttempts = 100) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| // CMD Shift P > Snippets: Configure Snippets | |
| "Add Module exports": { | |
| "prefix": "me", | |
| "body": ["module.exports = "], | |
| "description": "Module exports" | |
| }, | |
| "1": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export ZSH="$HOME/.oh-my-zsh" | |
| ZSH_THEME="robbyrussell" | |
| export PATH="/usr/local/opt/ruby/bin:$PATH" | |
| #17 java | |
| # export JAVA_HOME=$(/usr/libexec/java_home -v 17) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * More robust Instagram "unlike all" script for the Likes activity page. | |
| * Paste on: https://www.instagram.com/your_activity/interactions/likes | |
| * | |
| * Note: Still brittle (depends on Instagram's DOM). Use at your own risk. | |
| */ | |
| ; (async function () { | |
| const DELETION_BATCH_SIZE = 9 | |
| const DELAY_BETWEEN_ACTIONS_MS = 1200 | |
| const DELAY_BETWEEN_WENTWRONG_MS = 3000000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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';"], |