Skip to content

Instantly share code, notes, and snippets.

Begin by enclosing all thoughts within <thinking> tags, exploring multiple angles and approaches.
Break down the solution into clear steps within <step> tags. Start with a 20-step budget, requesting more for complex problems if needed.
Use <count> tags after each step to show the remaining budget. Stop when reaching 0.
Continuously adjust your reasoning based on intermediate results and reflections, adapting your strategy as you progress.
Regularly evaluate progress using <reflection> tags. Be critical and honest about your reasoning process.
Assign a quality score between 0.0 and 1.0 using <reward> tags after each reflection. Use this to guide your approach:
0.8+: Continue current approach
0.5-0.7: Consider minor adjustments
Below 0.5: Seriously consider backtracking and trying a different approach
@YogSottot
YogSottot / launchikvm
Created July 13, 2024 07:40 — forked from eniac111/launchikvm
The script fixes the annoying "no iKVM64 in java.library.path" bug with the Java iKVM laucher of some Supermicro servers :)
#!/bin/bash
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <[email protected]> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return Blagovest Petrov
# ----------------------------------------------------------------------------
# The script fixes the "no iKVM64 in java.library.path" bug with the SuperMicro
# iKVM Java S**t. You can do an alias of it, like: "alias javaws=/usr/local/bin/launchikvm"
@YogSottot
YogSottot / debloatMEmu.md
Created February 14, 2024 16:45 — forked from TameemS/debloatMEmu.md
Debloating & Optimizing MEmu

Inspired by this

More of my guides: Debloating LDPlayer - Debloating Nox (Updated)

Edit 22/8/2021: I have updated MEmu and it seems like it reinstalls the apps and re-enables the services. Repeat steps 5, 7, 8, and 9 if you update MEmu.

Debloating MEmu

In my experience, Nox can be quite slow and choppy, and looks like I'm not the only person with this problem. A lot of people say that MEmu performs better than Nox, and I could agree with that. I have no chopping issues with it so far. But like Nox, there are kinda shady stuff going on.

@YogSottot
YogSottot / How to use ssh-copy-id.md
Created February 9, 2024 11:25 — forked from CharlesGodwin/How to use ssh-copy-id.md
Windows 10/11 scripts to support ssh-copy-id which is missing in Windows OpenSSH

The Windows version of OpenSSH client doesn't include a ssh-copy-id command. I don't know why. If it does one day, then this can be ignored.

NOTE If you have Windows Subsystem for Linux (WSL) installed, you can use the linux version of ssh-copy-id instead. Go to the description at the end of this document.

  • Download the file ssh-copy-id.cmd to your Windows PC, or copy and paste its contents.
  • Run the script passing your linux ssh information (for example ssh-copy-id.cmd [email protected]). This should work with any Linux platform. Alternatively, if you have experience, you can use the powershell version. ssh-copy-id.ps1. Run the script as powershell .\ssh-copy-id.ps1 [email protected].
  • Run the command for each linux account you connect with. You will be prompted for your Linux host password. If you have more than 1 account on any machine, you must do this for each account.

The file name and location of the script is not important but the filename extension must be .cmd

@YogSottot
YogSottot / nginx.conf
Created January 31, 2024 18:23 — forked from morhekil/nginx.conf
Full request/response body logging in nginx
http {
log_format bodylog '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time '
'<"$request_body" >"$resp_body"';
lua_need_request_body on;
set $resp_body "";
body_filter_by_lua '
@YogSottot
YogSottot / Autocomplete_ssh_scp.md
Created January 30, 2024 14:30 — forked from nhthai2005/Autocomplete_ssh_scp.md
Autocomplete server names for SSH and SCP for Git Bash

Autocomplete server names for SSH and SCP for Git Bash

For ssh

1. Make a file with name ssh as following content:

_ssh() 
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
@YogSottot
YogSottot / debloatNox.md
Created January 24, 2024 00:37 — forked from Log1x/debloatNox.md
Debloating & Optimizing Nox

Debloating Nox

Nox, despite being the most feature-filled Android emulator, has a lot of negativity surrounding it due to their antics when it comes to making income off of their program. It is known for running repeated advertisments in the background, calling home and passing along system information (outside of your Android instance) as well as a vast amount of potentially sensitive data in an encrypted payload back to their multitude of servers. With the following preventitive measures, we can stop a majority of this happening as well as greatly improve the overall performance.

  1. Download and Install a fresh copy of Nox. The latest version is fine (for now). If you already have it installed, that is fine too. No need to reinstall.

  2. Enable Root Mode on Nox by clicking the gear icon and then checking the Root Startup box.

  3. Install a new Launcher from the Play Store. ANYTHING but Nox's default. I suggest [Nova Launcher](https://play.google.com/s

@YogSottot
YogSottot / mount_qcow2.md
Created January 19, 2024 07:26 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@YogSottot
YogSottot / dump_bitrix_core.sh
Last active October 13, 2023 14:21 — forked from mborodov/dump_bitrix_core.sh
Dump bitrix database with settings from dbconn.php and Bitrix core
#!/bin/bash
doc_root=$1
# проверим передали ли параметр док рута
if [ -z $doc_root ]; then
echo Usage: $0 /path/to/document/root [backup_name]
exit
fi
# если не указано имя дампа по умолчанию dump
@YogSottot
YogSottot / backup.sh
Created May 29, 2023 10:11 — forked from dynax60/backup.sh
Simple site change tracker
#!/bin/bash
PATH=/usr/bin:/usr/sbin
# Установка переменных
SITE_DIRECTORY="/var/www/mysite.ru" # Путь к директории сайта
BACKUP_DIRECTORY="/opt/git/site" # Путь к директории для сохранения бэкапов
EMAIL_RECIPIENT="[email protected]" # Адрес получателя электронной почты
MAX_DIFF_SIZE=$((10 * 1024)) # 10 Кб в байтах
# Создание временной директории для выполнения операций