Skip to content

Instantly share code, notes, and snippets.

@sor88
sor88 / preseed-2G-swap
Created February 15, 2024 10:34 — forked from hurulu/preseed-2G-swap
Ubuntu unattended installation preseed sample
# Ubuntu Server Quick Install
# by Dustin Kirkland <kirkland@ubuntu.com>
# * Documentation: http://bit.ly/uquick-doc
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/splash boolean false
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
#d-i console-setup/variantcode string
d-i netcfg/choose_interface select auto
@sor88
sor88 / move docker volume (backup and restore docker volume)
Created August 11, 2022 10:35 — forked from WeslyG/move docker volume (backup and restore docker volume)
Перенос docker volume между серверами
Как мигрировать docker volume на примере elasticsearch
# Backup
Запускаем елку, и вкидываем в нее данные, хоть через апи, хоть elasticdump
После этого в вольюмах будет много данных (тестировалось на 2 елке)
Смотрим оф руководство https://docs.docker.com/storage/volumes/#backup-a-container
#!/usr/bin/perl -w
use strict;
my $remote = 'carol@office.growjob.com::carol/dump';
my $phase = shift;
if ($phase eq 'backup-end') {
@sor88
sor88 / zabbix_api.py
Created December 21, 2020 05:17 — forked from quiver/zabbix_api.py
Python script to demonstrate usage of Zabbix 1.8 API. Depends on requests module. (http://docs.python-requests.org/) API spec : https://www.zabbix.com/documentation/1.8/api
# vim: set fileencoding=utf8
#
# authenticate with zabbix api server, and retrieve monitored hosts
# specification : https://www.zabbix.com/documentation/1.8/api
#
# $ python zabbix_api.py
import requests
from pprint import pprint
import json

Live backup of KVM virtual machines

This script will let you make backups of live VMs running on KVM, using libvirt.

The backup job will suspend the VM for the time it takes to copy the RAM to disk.

Credits: Luca Lazzeroni

I've made some minor adjustments.

@sor88
sor88 / LICENCE SUBLIME TEXT
Created March 6, 2019 16:09
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@sor88
sor88 / crypt_unlock.sh
Created August 14, 2017 11:52 — forked from mariodpros/crypt_unlock.sh
/etc/initramfs-tools/hooks/crypt_unlock.sh
#!/bin/sh
# https://stinkyparkia.wordpress.com/2014/10/14/remote-unlocking-luks-encrypted-lvm-using-dropbear-ssh-in-ubuntu-server-14-04-1-with-static-ipst/
PREREQ="dropbear"
prereqs() {
echo "$PREREQ"
}