Skip to content

Instantly share code, notes, and snippets.

@rsyuzyov
rsyuzyov / 70-persistent-net.rules
Created January 6, 2025 13:01
udev network card name
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:11:22:33:44:55", NAME="ethint0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="66:77:88:99:aa:bb", NAME="ethusb0"
@rsyuzyov
rsyuzyov / openssh.txt
Last active January 4, 2025 20:21
openssh.txt
установка openssh сервера
https://habr.com/ru/sandbox/141668/
@rsyuzyov
rsyuzyov / tmux.txt
Last active January 4, 2025 20:20
tmux.txt
Хоткеи
https://github.com/var-bin/terminalForCoder__WSD/blob/master/tmux/hotkey.md
https://habr.com/ru/articles/318376/
<Macro pub1C $dir>
Alias "/$dir" "/var/www/$dir/"
<Directory "/var/www/$dir">
AllowOverride All
Options None
Require all granted
SetHandler 1c-application
ManagedApplicationDescriptor "/var/www/$dir/default.vrd"
</Directory>
</Macro>
@rsyuzyov
rsyuzyov / proxmox-cpu-support.sh
Created December 20, 2024 12:52
proxmox cpu support
flags=$(cat /proc/cpuinfo | grep flags | head -n 1 | cut -d: -f2)
supports_v2='awk "/cx16/&&/lahf/&&/popcnt/&&/sse4_1/&&/sse4_2/&&/ssse3/ {found=1} END {exit !found}"'
supports_v3='awk "/avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/ {found=1} END {exit !found}"'
supports_v4='awk "/avx512f/&&/avx512bw/&&/avx512cd/&&/avx512dq/&&/avx512vl/ {found=1} END {exit !found}"'
echo "$flags" | eval $supports_v2 || exit 2 && echo "CPU supports x86-64-v2"
echo "$flags" | eval $supports_v3 || exit 3 && echo "CPU supports x86-64-v3"
echo "$flags" | eval $supports_v4 || exit 4 && echo "CPU supports x86-64-v4"
@rsyuzyov
rsyuzyov / syncthing_api_examples.md
Created December 9, 2024 17:01 — forked from ingestbot/syncthing_api_examples.md
Syncthing API Examples
@rsyuzyov
rsyuzyov / apache_cors.txt
Created December 9, 2024 04:45
apache cors
Alias "/testcors" "${SRVROOT}/htdocs/testcors/"
<Directory "${SRVROOT}/htdocs/testcors/">
AllowOverride All
Options None
Require all granted
SetHandler 1c-application
ManagedApplicationDescriptor "${SRVROOT}/htdocs/testcors/default.vrd"
Options +FollowSymLinks
Header always set Access-Control-Allow-Origin *
@rsyuzyov
rsyuzyov / apache_macro.txt
Created December 9, 2024 04:44
apache macro
# 1c publication using macro
<Macro pub1C $dir>
Alias "/$dir/" "C:/Program Files/Apache24/htdocs/$dir/"
<Directory "C:/Program Files/Apache24/htdocs/$dir">
AllowOverride All
Options None
Require all granted
SetHandler 1c-application
ManagedApplicationDescriptor "C:/Program Files/Apache24/htdocs/$dir/default.vrd"
</Directory>
@rsyuzyov
rsyuzyov / virtualhere.sh
Last active January 4, 2025 20:12
virtualhere.sh
wget https://www.virtualhere.com/sites/default/files/usbclient/scripts/virtualhereclient.service
wget https://www.virtualhere.com/sites/default/files/usbclient/vhclientx86_64
chmod +x ./vhclientx86_64
mv ./vhclientx86_64 /usr/sbin
mv virtualhereclient.service /etc/systemd/system/virtualhereclient.service
systemctl daemon-reload
systemctl enable virtualhereclient.service
systemctl start virtualhereclient.service
@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"