Skip to content

Instantly share code, notes, and snippets.

View uncelvel's full-sized avatar

Đặng Xuân Cảnh uncelvel

View GitHub Profile
@uncelvel
uncelvel / gist:eaf9925761ee91639134189f508123a0
Created July 12, 2022 03:11
remove-local-storage-proxmox
sub parse_config {
my ($class, $filename, $raw) = @_;
my $cfg = $class->SUPER::parse_config($filename, $raw);
my $ids = $cfg->{ids};
=comment-out
# make sure we have a reasonable 'local:' storage
# we want 'local' to be always the same 'type' (on all cluster nodes)
@uncelvel
uncelvel / ubuntu-mainline-kernel.sh
Created October 12, 2022 03:59
Upgrade newest kernel Ubuntu
#!/usr/bin/env bash
# shellcheck disable=SC1117
# Ubuntu Kernel PPA info
ppa_host="kernel.ubuntu.com"
ppa_index="/~kernel-ppa/mainline/"
ppa_key="17C622B0"
# If quiet=1 then no log messages are printed (except errors)
#!/bin/bash
# Script Gen file and rename file
number_small_file=1000
number_large_file=500
#sudo apt install pwgen -y
# ================ Small file ================
import logging
import os
import pathlib
import sys
from datetime import datetime
import time
from dotenv import load_dotenv
# env = load_dotenv()
host=$(hostname)
/sbin/chkconfig -list > 01.1.services.txt
/bin/cat /etc/xinetd.conf > 01.2.etc_xinetdconf.txt
/bin/cat /etc/xinetd.d/r* > 01.3.etc_xinetdd_r.txt
/bin/ls -al /home/* > 01.4.home_dirs.txt
/bin/cat /etc/hosts.equiv > 02.${host}_host_equiv.txt
/bin/ls -l /etc/hosts.equiv > 03.${host}_perm_equiv.txt
/bin/cat /etc/passwd > 04.${host}_etc_passwd.txt
/bin/more /etc/shadow > 05.etc_shadow.txt
/usr/bin/ypcat passwd > 06.passwd.txt