Skip to content

Instantly share code, notes, and snippets.

@rsyuzyov
rsyuzyov / AnyDesk-Reset.cmd
Created November 21, 2024 06:56 — forked from janasco/AnyDesk-Reset.cmd
AnyDesk Reset
@echo off & setlocal enableextensions
title Reset AnyDesk
reg query HKEY_USERS\S-1-5-19 >NUL || (echo Please Run as administrator.& pause >NUL&exit)
chcp 437
call :stop_any
del /f "%ALLUSERSPROFILE%\AnyDesk\service.conf"
del /f "%APPDATA%\AnyDesk\service.conf"
copy /y "%APPDATA%\AnyDesk\user.conf" "%temp%\"
rd /s /q "%temp%\thumbnails" 2>NUL
xcopy /c /e /h /r /y /i /k "%APPDATA%\AnyDesk\thumbnails" "%temp%\thumbnails"
@rsyuzyov
rsyuzyov / fiodiskmark.sh
Last active November 17, 2024 18:44
fiodiskmark.sh
#!/bin/bash
FIOTXT="${0/.sh/.fio}"
RESULTFILE_PATH="${0/.sh/.txt}"
TESTFILE_PATH="${0/.sh/.tmp}"
TESTFILE_SIZE="1000m"
TEST_LOOPS="5"
printline(){
echo "$1" "$2" "$3" "$4" "$5" "$6"
echo "$1" "$2" "$3" "$4" "$5" "$6" >> $RESULTFILE_PATH
@rsyuzyov
rsyuzyov / dhcp-dyndns.sh
Created February 27, 2024 16:43
dhcp-dyndns.sh
#!/bin/bash
# On FreeBSD change the above line to #!/usr/local/bin/bash
#
# /usr/local/bin/dhcp-dyndns.sh
#
# This script is for secure DDNS updates on Samba,
# it can also add the 'macAddress' to the Computers object.
#
# Version: 0.9.6
#
@rsyuzyov
rsyuzyov / addc+dhcp+dns.md
Last active February 28, 2024 09:35
ad dc + dhcp + dynamic update dns

AD DC

#Поднятие дополнительного контроллера в существующем домене: 
apt install acl attr samba winbind libpam-winbind libnss-winbind krb5-config krb5-user dnsutils python3-setproctitle -y
rm /etc/samba/smb.conf
kinit domaindaminuser
samba-tool domain join domain.local DC

#Все пользователи:
wbinfo -u
@rsyuzyov
rsyuzyov / setupProxy.js
Last active February 11, 2024 17:35
setupProxy.js
const { createProxyMiddleware } = require('http-proxy-middleware')
module.exports = function (app) {
app.use(
'/api',
createProxyMiddleware({
target: 'http://host:port',
pathRewrite: {
'^/api': '/ibname/hs/servicename'
},
changeOrigin: true,
@rsyuzyov
rsyuzyov / easy-wg-quick.sh
Created October 29, 2023 04:26
easy-wg-quick
#!/bin/sh
# easy-wg-quick - Creates WireGuard configuration for hub and peers with ease
# Copyright (C) 2019-2023 Krzysztof Burghardt <krzysztof@burghardt.pl>
#
#
# License
# -------
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
@rsyuzyov
rsyuzyov / pgcompacttable
Last active September 10, 2024 15:43
pgcompacttable
apt install libdbi-perl libdbd-pg-perl -y
su postgres
psql: create extension pgstattuple;
wget https://raw.githubusercontent.com/dataegret/pgcompacttable/master/bin/pgcompacttable
chmod +x pgcompacttable
./pgcompacttable -h localhost -U postgres -W password -d database --verbose
+1Создать в ЦБ и начать регистрацию изменений
+Сделать тонкий клон
+Проверить план в реплике
+Остановить старый кластер
+systemctl disable postgrespro-1c-11.service
+Поставить пг15 (https://github.com/rsyuzyov/work-on-linux/blob/master/postgresql/postgresql.md)
wget https://repo.postgrespro.ru/1c-15/keys/pgpro-repo-add.sh
sh pgpro-repo-add.sh
@rsyuzyov
rsyuzyov / 1c-background-extproc.txt
Last active March 12, 2023 07:36
1С: фоновое выполнение методов внешней обработки
Фоновое выполнение методов внешней обработки:
https://wiki.programstore.ru/zapusk-fonovogo-zadaniya-vo-vneshnej-obrabotke-s-indikaciei/
Фоновое многопоточное выполнение методов внешней обработки:
https://infostart.ru/1c/articles/1812197/
@rsyuzyov
rsyuzyov / install-1c-on-linux
Last active September 19, 2026 19:31
install 1c on linux
Для клиента:
apt install ttf-mscorefonts-installer libenchant1c2a fontconfig
fc-cache -fv
Установка полного пакета:
tar -xvzf server64_8_3_22_1750.tar.gz
./setup-full-8.3.22.1750-x86_64.run
Либо только сервера:
dpkg -i 1c-enterprise-8.3.25.1394-*