Skip to content

Instantly share code, notes, and snippets.

@YogSottot
YogSottot / SSH-Local Auth Linux.yaml
Created January 31, 2025 15:25
zabbix SSH-Local Auth Linux
zabbix_export:
version: '7.0'
template_groups:
- uuid: 6bdf2c96bf374172a0e108c0e1ddb355
name: 'Линукс Сервера/Linux servers'
templates:
- uuid: a809457c33424690851a69f7777f5882
template: 'SSH-Local Auth Linux'
name: 'SSH-Local Auth Linux'
description: |
@YogSottot
YogSottot / SSH_auth.log.yaml
Created January 31, 2025 10:49
ssh login template
zabbix_export:
version: '7.0'
template_groups:
- uuid: 6bdf2c96bf374172a0e108c0e1ddb355
name: 'Линукс Сервера/Linux servers'
templates:
- uuid: b2f90633a77c4b618d61797170349cb4
template: 'SSH Auth'
name: 'SSH auth.log'
groups:
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 / extend_expiring_tokens.rb
Created June 28, 2024 02:00
extend all personal token for gitlab
# https://about.gitlab.com/blog/2023/10/25/access-token-lifetime-limits/
# This script extends the lifetime of all tokens which expire on a specified date, including:
#
# Personal access tokens
# Group access tokens
# Project access tokens
#
# Users that have intentionally set a token to expire on the specified date will have their token lifetimes extended as well.
#
# To use the script:
@YogSottot
YogSottot / apply_repo_diff.sh
Last active May 22, 2024 06:12
fake touch fix patch
## Script to patch up diff created by `repo diff`
if [ -z "$1" ] || [ ! -e "$1" ]; then
echo "Usages: $0 <repo_diff_file>";
exit 0;
fi
rm -fr _tmp_splits*
cat $1 | csplit -qf '' -b "_tmp_splits.%d.diff" - '/^project.*\/$/' '{*}'
@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]}"