Skip to content

Instantly share code, notes, and snippets.

View driversti's full-sized avatar
🦝
Have been making 🪲 since birth

Yurii Chekhotskyi driversti

🦝
Have been making 🪲 since birth
View GitHub Profile
@driversti
driversti / auto_open_satoshi_box.md
Last active February 2, 2024 19:06
Auto-opening satoshi boxes
@driversti
driversti / chatgpt-cwa
Last active January 19, 2024 20:10
Adjust the width of the content area in ChatGPT dialog interactively with buttons
// ==UserScript==
// @name ChatGPT Content Width Adjuster (CWA)
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Adjust the width of the content area in ChatGPT dialog interactively with buttons
// @author driversti
// @match https://chat.openai.com/*
// @grant GM_addStyle
// @grant GM_registerMenuCommand
// ==/UserScript==
@driversti
driversti / erepublik_posts_filter.userscript.js
Created January 7, 2024 19:45
Filter out posts you don't like
// ==UserScript==
// @name eRepublik Post Filter
// @version 1.1
// @description FIlter out post you don't like specifying keywords (banned words)
// @author driversti https://www.erepublik.com/en/citizen/profile/4690052
// @match https://www.erepublik.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
// @run-at document-end
// @icon https://www.google.com/s2/favicons?sz=64&domain=erepublik.com
// @grant none
@driversti
driversti / auto_activation_3min_pp_boosters.userscript.js
Last active January 8, 2024 19:40
Automatic activation 3 min PP boosters
// ==UserScript==
// @name 3min PP boosters activation
// @namespace https://www.erepublik.com/
// @version 1.1
// @description Activate all 3min PP boosters with one click.
// @copyright YOU ARE NOT ALLOWED TO DISCLOSE THIS SCRIPT TO OTHERS WITHOUT MY PERMISSION!!!
// @author driversti https://www.erepublik.com/en/citizen/profile/4690052
// @match https://www.erepublik.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=erepublik.com
// @grant none
@driversti
driversti / README.MD
Last active December 9, 2023 11:39
Automated over time work

README for Automated Overtime Work Script


Overview

This script is designed to work over time by spending all either available energy or overtime points. It runs in a loop every 5 seconds and checks certain conditions in the response data to decide whether to continue or stop the loop.

How to Use

  1. Open the Browser Console:
@driversti
driversti / start_cpu_stress.sh
Created October 12, 2023 06:04
Load Oracle instance
#!/bin/bash
# start_cpu_stress.sh
# Calculate the desired CPU limit based on the total number of cores
total_cores=1
desired_load_percentage=90
cpu_limit=$(awk -v cores="$total_cores" -v perc="$desired_load_percentage" 'BEGIN { printf "%d", cores * perc }')
echo "CPU limit: $cpu_limit%"
@driversti
driversti / fb_install_alpine.sh
Last active February 24, 2024 12:26
Installs, enables and runs FileBrowser on a server. Since all my servers are accessible via VPN only I want to be able to choose to which IP bind FileBrowser
#!/bin/sh
# Install FileBrowser
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
# Get all IP addresses using ip command and filter out the IP addresses
IPS=$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1)
# Print them out for the user
echo "Available IPs:"

Get Started with the Profile Statistic Script

Here's a step-by-step guide on how to run the profile statistic script either with Node.js or Docker.

Prerequisites

  • A computer running a GNU/Linux or macOS operating system.
  • Basic knowledge of the command-line interface.
  • Administrator (root) access to your machine.

1. Running with Node.js

@driversti
driversti / MC Cheat Sheet
Created June 12, 2023 05:39 — forked from samiraguiar/MC Cheat Sheet
Midnight Commander Cheat Sheet / Shortcuts
Note for newcomers:
In the shortcuts below, "C" stands for CTRL and "A" stands for "ALT". This is a convention
used in the Midnight Commander documentation and was kept here.
You can also use "ESC" instead of "ALT", which is useful on Macbooks.
Main View
---------------------------------------------------------------
- File/directory operations
// ==UserScript==
// @name ErepComp
// @version 0.1
// @author Mike Dreams
// @match https://www.erepublik.com/en/economy/myCompanies
// @match https://www.erepublik.com/uk/economy/myCompanies
// @grant none
// ==/UserScript==
(function(){var ePar=document.getElementById("help_manage").parentElement;function selectallhp(){for(var e=Math.floor((erepublik.citizen.energy+erepublik.citizen.energyFromFoodRemaining)/10),t=getCompanies(),n=0;n<t.length;)t[n].classList.contains("active")?0<e?e--:(t[n].classList.remove("active"),calculateProduction(t[n].parentElement.parentElement,!0)):0<e&&(t[n].classList.add("active"),calculateProduction(t[n].parentElement.parentElement,!0),e--),n++;finalize()}function plus10(){for(var e=getCompanies(),t=0,n=0;n<10&&t<e.length;)e[t].classList.contains("active")||(e[t].classList.add("active"),calculateProduction(e[t].parentElement.parentElement,!0),n++),t++;finalize()}function minus10(){for(var e=getCompanies(),t=e.length-1,n=0;n<10&&-1<t;)e[t