Skip to content

Instantly share code, notes, and snippets.

View SatoshiMota's full-sized avatar
🏠
Working from home

SatoshiMota SatoshiMota

🏠
Working from home
View GitHub Profile
@SatoshiMota
SatoshiMota / phonetic_username_generator.js
Created October 11, 2025 12:22
Phonetic Username Generator
function generateNick(minLength = 6, maxLength = 15, symbols = "-_", useСapitalLetters = true) {
while (true) {
let word = "";
// Генерация начального слова (по умолчанию согласная и после неё гласная), 70% шанс что первая буква согласная, 3% щанс что тип буквы повторится подрят
let isConsonant = Math.random() < 0.7;
const wordLength = Math.floor(Math.random() * (maxLength - minLength + 1)) + minLength;
for (let i = 0; i < wordLength; i++) {
const pool = isConsonant ? "bcdfghjklmnpqrstvwxyz" : "aeiou";
word += pool[Math.floor(Math.random() * pool.length)];
@SatoshiMota
SatoshiMota / eclipse_transaction.js
Last active May 9, 2025 07:39
Eclipse Turbo Tap Transactions
// Установка зависимости (глобально тоесть доступ из любой папки): npm install -g @solana/web3.js
// Запуск: node eclipse_transaction.js
const crypto = require("crypto");
const {Connection,Keypair,Transaction,PublicKey,TransactionInstruction} = require("@solana/web3.js");
// ИНСТРУКЦИЯ / НАСТРОЙКА
// 1. На сайте тапалки пополните ETH для кликов, откройте транзакцию и после откройте адрес на которые ушли ETH
// 2. В local storage сайта (консоль → Application) есть wallet вставить ниже
const payerPrivateKey = Uint8Array.from([54, 98, 322, 125, 141, 69, 167, 149, 123, 175, 142, 53, 12, 72, 45, 67, 23, 138, 141, 69, 167, 149, 123, 175, 142, 53, 12, 72, 45, 67, 23, 138, 141, 69, 167, 149, 123, 234, 142, 53, 12, 72, 45, 67, 23, 138]);
// 3. Раз 10 кликните тапалку и откройте любую из новых 10 транзакций (на адресе который достали в 1 шаге) например https://eclipsescan.xyz/tx/67T8Xp24rg8xX81JRTcc2mBVppXqiU6Xi4cfLscmdr7uq51UZ9rHLPsiSjCKQeorwgmKoyTywQrP8E5h8dcUPDSo
@SatoshiMota
SatoshiMota / MetaMask_encrypt_decrypt.js
Last active October 11, 2025 12:23
MetaMask wallet encrypt decrypt extension data
// node 13-MetaMask_encrypt_decrypt.js
const crypto = require('crypto');
// Функция для извлечения значения между двумя ключами
function extractValueBetweenKeys(data, startKey, endKey) {
const regex = new RegExp(`${startKey}(.*?)${endKey}`, 's');
const match = data.match(regex);
return match ? match[1] : null;
}
@SatoshiMota
SatoshiMota / encrypt_decrypt_data.js
Last active October 11, 2025 12:23
Secure Encrypt/Decrypt data via aes-256-gcm
const crypto = require('crypto');
//Шифрование
function encrypt(data, password) {
// Генерация salt для уникальности шифрованого пароля
const salt = crypto.randomBytes(16);
// Создание ключа из пароля (длиной 32 байта)
const key = crypto.pbkdf2Sync(password, salt, 1000000, 32, 'sha512');