Skip to content

Instantly share code, notes, and snippets.

@WhoisGray
WhoisGray / mobile.sh
Last active February 17, 2025 07:03
📝 Description: This Bash script provides a sleek and interactive way to list Android emulators, navigate through the list using arrow keys, and launch the selected emulator. It’s designed to simplify the development workflow and enhance productivity.
#!/bin/bash
# 🚀 Mobile Emulator Launcher
# Author: WhoisGray
# 📝 Description: A script to list available Android emulators, let you select one using arrow keys,
# and launch the selected emulator seamlessly.
# 🛠️ Define the path to the emulator command
EMULATOR_PATH="${ANDROID_HOME}/emulator/emulator"
@armamini
armamini / delog.js
Last active February 8, 2024 09:11
Delete all 'console.log' lines across anywhere of your project
const fs = require('fs');
const path = require('path');
// Recursive function to get all .ts and .js files in a directory
function getFiles(dir) {
let files = [];
fs.readdirSync(dir).forEach(file => {
const filePath = path.join(dir, file);
const stats = fs.statSync(filePath);
if (stats.isDirectory()) {
@farzany
farzany / script.js
Last active May 7, 2025 05:30
Twitter (𝕏) Script: Unlike all liked Tweets
async function wait(count) {
const timeout = count % 50 === 0 ? 30000 : Math.random() * 1000 + 2000;
await new Promise(resolve => setTimeout(resolve, timeout));
}
async function unlikeAllTweets({ limit, deleteTweets=false }) {
let count = 0;
while (count < limit) {
const unlikeButton = document.querySelector('[data-testid="unlike"]');
if (!unlikeButton) break;
@tavallaie
tavallaie / secure_erase.sh
Last active February 26, 2025 06:08
**Secure Data Erasure Script (Bash)** This Bash script securely erases data from a specified device with random data, ensuring irrecoverability. Use with caution.
#!/bin/bash
# Check if the script is run with superuser privileges
if [ "$EUID" -ne 0 ]; then
echo "Please run this script as root (sudo)."
exit 1
fi
# Prompt the user for the target devices
read -p "Enter the target devices (e.g., /dev/sdX /dev/sdY): " target_devices