Skip to content

Instantly share code, notes, and snippets.

@YogSottot
YogSottot / PVE-HP-ssacli-smart-storage-admin.md
Created June 3, 2022 06:03 — forked from mrpeardotnet/PVE-HP-ssacli-smart-storage-admin.md
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

Usage

curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
  sudo tee /etc/default/autossh@example
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/[email protected] | \
  sudo tee /etc/systemd/system/[email protected]

sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh # and copy your private key here
@YogSottot
YogSottot / pipewire.md
Created December 22, 2022 09:58 — forked from the-spyke/pipewire.md
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Unfortunately, aptX and AAC are not enabled because of patents and other technical reasons. However, looks like aptX will be available in coming 22.10 release. If you need these codecs in 22.04 you may use this PPA from @aglasgall which is based on universe, but rebuilds pipewire with

@YogSottot
YogSottot / pve_API2Subs_sed.sh
Created March 4, 2023 08:54 — forked from ngadmini/pve_API2Subs_sed.sh
remove naged subscription message on proxmox 7.x-x
#!/usr/bin/env bash
# TAGS
# /usr/local/bin/pve-API2Subs_sed.sh
# https://gist.github.com/ngadmini/7f9df377999cc78c1b58e361d5425ac4#file-pve_api2subs-sh
# AUTHOR
# [email protected]
# https://github.com/ngadmini
# https://gist.github.com/ngadmini
# VERSION
# v10.2
@YogSottot
YogSottot / README.md
Created May 26, 2023 08:31 — forked from Isa3v/README.md
CSS inline body | Minification HTML (Bitrix)

CSS inline body | Minification HTML (Bitrix)

Выводим css стили в тело и сжимаем html в 1 строку, удаляем css комментарии

(исправляя относительные пути изображений)

Добавляем в init.php и радуемся (или нет) как гугл прибаляет 10-15 балов

@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 Кб в байтах
# Создание временной директории для выполнения операций
@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 / 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 / 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 / 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]}"