Skip to content

Instantly share code, notes, and snippets.

View egorleet's full-sized avatar
🕊️
Peace & kindness first

Egor Volchenko egorleet

🕊️
Peace & kindness first
View GitHub Profile
@egorleet
egorleet / steam-market-buy-order-scraper.js
Last active September 18, 2025 23:26
Steam Market Buy Order Scraper - Checks for Buy Orders at a Specified Price
// Steam Market Buy Order Scraper
// Author: Egor Volchenko • www.egor.im
// With assistance from Grok, created by xAI
// Description: This script scrapes Steam Market listings, extracts item_nameid, and checks for buy orders at a specified price in the desired currency.
// Results are displayed in a div after .market_search_results_header, with missing orders highlighted in red.
// Usage: Run in browser console on a Steam Market search page (e.g., https://steamcommunity.com/market/search?appid=730).
// Note: Requires Steam login for steamLoginSecure cookie. Use with caution to avoid rate limits.
const currencies = [
{ code: 1, name: 'USD / United States Dollar ($)' },
@egorleet
egorleet / wp-add-bulk-comments.php
Created September 18, 2025 20:35
Bulk insert predefined comments into WordPress posts and pages
<?php
/**
* Bulk insert predefined comments into WordPress posts and pages.
* Supports Polylang homepages, random authors and dates.
*
* Usage: add ?add_comments=1 to URL while logged in as admin.
* Author: www.egor.im
* Created: 2025-09-18
*/
@egorleet
egorleet / wp-config.php
Last active September 16, 2025 12:31
Disables WP Cache for a specific domain
<?php
if (isset($_SERVER['HTTP_HOST']) && in_array($_SERVER['HTTP_HOST'], ['million.tools', 'www.million.tools'], true)) {
define('DONOTCACHEPAGE', true);
define('DONOTCACHEOBJECT', true);
define('DONOTCACHEDB', true);
define('DONOTROCKETOPTIMIZE', true);
define( 'WP_CACHE', false );
} else {
define( 'WP_CACHE', true );
}
@egorleet
egorleet / The command recursively changes the owner and group
Created June 15, 2025 19:03
The command recursively changes the owner and group of all files and directories inside the site.com folder, setting them to the user and group sitecom (relevant for CloudPanel).
chown -R sitecom:sitecom site.com
@egorleet
egorleet / nginx.conf
Last active August 15, 2025 06:16
Redirect to another domain while keeping SSL certificate renewal functional in CloudPanel
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
{{ssl_certificate_key}}
{{ssl_certificate}}
server_name million.tools www.million.tools;
let phpArrayString = "array(";
const elements = document.querySelectorAll('.game-item');
elements.forEach((element, index) => {
const value = element.getAttribute('data-ga-param');
phpArrayString += `'${index}' => '${value}'`;
if (index < elements.length - 1) {
phpArrayString += ", ";
}
});
@egorleet
egorleet / Upload static by url to WordPress (Media Gallery)
Last active February 11, 2025 11:49 — forked from RadGH/rs_upload_from_url.php
Upload a file from a URL to the WordPress media gallery. Supports images, PDFs, and other file types.
tar -zcv --exclude='.DS_Store' -f milliontools.tar.gz site/
Selecting next duplicate word - CMD + G
Selecting all duplicate words - Control + G
Upload to.. - Option + Shift + CMD + X (mine Option + CMS + S)
Untab - Shift + Tab
/**
* Connect *.php files from core folder
*/
function include_classes() {
$files = glob( get_template_directory() . '/core/*.php' );
foreach ( $files as $file ) {
include_once( $file );
}
}
add_action( 'after_setup_theme', 'include_classes', 11 );