Jan 14
2024
Jan 14
2024
Sep 14
2023
wrong Video codec on Opera Linux Mint
install chromium and
mv /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so.orig ln -s /usr/lib/chromium/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/
Sep 9
2023
MSSQL restore all databases from folder with .bak files
Powershell
Install-Module dbatools Import-Module dbatools Set-DbatoolsInsecureConnection -SessionOnly Restore-DbaDatabase -SqlInstance SERVER-NAME\INSTANCE-NAME -Path 'C:\PATH-TO-BACKUPS'
Sep 2
2023
MSSQL: User, group, or role ‘platnik’ already exists in the current database.
lists logins and incorrect SIDs
USE <platnik_db>
GO
EXEC sp_change_users_login 'Report'
GO
Then start SQL
USE <platnik_db>
GO
EXEC sp_change_users_login 'Auto_Fix','<user_name>',NULL, '<password>'
GO
Sep 2
2023
Delete multiple databases in MSSQL
drop databases query
USE master; Go SELECT 'DROP DATABASE ['+ name + ']' FROM sys.databases WHERE name like 'PREFIX%'; GO
Aug 27
2023
snapshots of UEFI libvirt-based (KVM) virtual machines
Shut down VM and then Listing qemu-img snapshot -l <file>.qcow2
Create qemu-img snapshot -c <snap-name> <file>.qcow2
Revert to qemu-img snapshot -a <snap-name> <file>.qcow2 Delete qemu-img snapshot -d <snap-name> <file>.qcow2
Aug 18
2023
USB NIC reset
lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 04f2:b477 Chicony Electronics Co., Ltd HP HD Webcam
Bus 003 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
then
usbreset 0bda:8153
Aug 13
2023
Aug 9
2023
Deletes files older than 30 days
forfiles /p "C:\sql.arch" /s /m *.* /D -30 /C "cmd /c del /Q /S @path"