Skip to content

Instantly share code, notes, and snippets.

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

Yurii driversti

🦝
Have been making 🪲 since birth
View GitHub Profile
@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
@driversti
driversti / endorse_and_travel.sh
Last active April 22, 2025 08:21
The commands allow you to automate endorsing and traveling in eRepublik during the Spring Break event.
=== ENDORSES ===
Open the browser's console and paste the command:
for(let i=0;i<=220;i++){setTimeout(()=>{fetch('https://www.erepublik.com/en/main/donate-article',{method:'POST',headers:{'content-type':'application/x-www-form-urlencoded','cookie':`erpk=${erepublik.settings.pomelo.authToken}`},body:`articleId=${2765400+i}&amount=5&_token=${SERVER_DATA.csrfToken}`,compress:true})},5000*i);}
Press Enter. In about 17,5 min you will have about 200 endorses of 5сс
=== TRAVELLING ===
#!/bin/bash -x
DESTS=( "http://duma.gov.ru/" "http://president-sovet.ru/" "https://sovetnational.ru/" "https://www.gosuslugi.ru/ru/" "https://zakupki.gov.ru/epz/main/public/home.html" "https://gossluzhba.gov.ru/" "http://defence.council.gov.ru/" "http://budget.council.gov.ru/" "http://www.kremlin.ru/" "https://government.ru/" "http://www.scrf.gov.ru/" "http://www.ksrf.ru/ru/Pages/default.aspx" "http://www.vsrf.ru/" "http://premier.gov.ru/events/" "https://www.mchs.gov.ru/" "https://minjust.gov.ru/ru/" "http://www.fsb.ru/" "https://rosguard.gov.ru/" "https://customs.gov.ru/" "https://udprf.ru/" "http://favt.gov.ru/" "http://194.67.2.109:53/UDP" "http://194.67.7.1:53/UDP" "http://194.54.14.187:53/UDP" "http://194.54.14.186:53/UDP" )
TIME="180s"
while TRUE
do
for DEST in ${DESTS[@]}
@driversti
driversti / ListsRealTest.groovy
Created December 13, 2021 06:13
OAuth 1.0a Twitter API example
import static java.lang.String.format
import static java.net.http.HttpRequest.BodyPublishers
import static java.net.http.HttpResponse.BodyHandlers
import com.github.driversti.twittygram.utils.PercentUtil
import com.github.driversti.twittygram.utils.SignatureUtil
import java.net.http.HttpRequest
import java.net.http.HttpResponse
import java.time.Instant
import org.apache.commons.lang3.RandomStringUtils