Skip to content

Instantly share code, notes, and snippets.

Vladislav V. Prodan click0

Block or report user

Report or block click0

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@click0
click0 / cbsdd
Created May 7, 2019
fix log warning
View cbsdd
--- cbsdd.orig 2019-05-07 01:58:50.410050000 +0300
+++ cbsdd 2019-05-07 02:01:56.420224000 +0300
@@ -6,6 +6,12 @@
CBSDMODULE="taskd"
EXTHELP="wf_taskd.html"
+file_log=/var/log/cbsd/cbsd.log
+
+log123() {
+ echo "[$(date +'%Y-%m-%dT%H:%M:%S%z')]: $@" >> ${file_log}
@click0
click0 / gateway.nanobsd
Created Apr 28, 2019 — forked from blacklion/gateway.nanobsd
my NanoBSD router config
View gateway.nanobsd
#! /bin/sh
NANO_NAME=gateway-j3160
NANO_SRC=/data/src
NANO_OBJ=/usr/obj/nanobsd/gateway.v3
NANO_ROOT_DIR=/usr/home/lev/nanobsd
NANO_CONFROOT=${NANO_ROOT_DIR}/gateway.v3
NANO_TOOLS=${NANO_ROOT_DIR}/scripts
@click0
click0 / install_factorio.sh
Created Jan 30, 2019
# Install Factorio server in Debian 8.x-9.x
View install_factorio.sh
#!/bin/sh
# Install Factorio server in Debian 8.x-9.x
apt-key update; apt-get update && apt-get -y install lsb-release ca-certificates
[ ! -d /opt ] && mkdir -p /opt;
cd '/opt'
apt-get -y install git mc screen
git clone https://github.com/Bisa/factorio-init.git
View pwnedpassword3.sh
#!/usr/bin/env sh
set -e
#set -x
# ask user for password
read -p "Input password for check: " -t 30 passwd
# sha1sum replaced openssl sha1 | awk '{ print $2;}'
View random-ipv6-address-generator.15.sh
#!/bin/sh
# Copyright Andrey Mitrofanov
# Copyright pavlinux http://pavlinux.ru
# 2011
MAXCOUNT=20
count=0
network_v6=2a01:7a0:2:12 # your ipv6 network prefix
@click0
click0 / zfs_start_transfer_backup.sh
Created May 13, 2011
Backup method of incremental transfer ZFS partitions from one pool to another within a single machine
View zfs_start_transfer_backup.sh
#!/bin/sh
#The initial creation of ZFS partition for further incremental copying
pool=zroot #source distination
pool2=tank #recipient pool
volume2=$pool2/backup/$pool #recipient
fs_list='/mysql /usr /usr/ports /usr/src /usr/home /tmp /var /var/crash /var/db /var/db/pkg
/var/empty /var/imap /var/imap-cache /var/log /var/mail /var/run /var/tmp'"
"`zfs list | grep ^zroot/www | awk ' {print $5}' | tr "\r\n" " "`
@click0
click0 / incremental-backup.sh
Created Apr 24, 2011
Резервное копирование файлов, измененных с такой-то даты
View incremental-backup.sh
echo "date +'%F %R:%S'" > /root/VPSbackups/last.timestamp.backup
tar czvf /root/VPSbackups/VPSbackup.tar.gz -N"$LAST" --exclude-from=/VPSbackups/tar.excludelist.txt /etc/ /root/exportdb/ /home/username/ > /root/VPSbackups/backup.log 2>&1
##где tar.excludelist.txt - список исключений;
##а LAST - файл с датой в формате date +'%F %R:%S'
LAST=`cat /root/VPSbackups/last.timestamp.backup`
@click0
click0 / random-ipv6-address-generator.sh
Created Apr 24, 2011
Random generator ipv6 addresses within your ipv6 network prefix.
View random-ipv6-address-generator.sh
#Random generator ipv6 addresses within your ipv6 network prefix.
#!/usr/local/bin/bash
# Copyright
# Vladislav V. Prodan
# universite@ukr.net
# 2011
array=( 1 2 3 4 5 6 7 8 9 0 a b c d e f )
@click0
click0 / zfs-backup-mysql.sh
Created Apr 24, 2011
Just a small script I wrote to backup mysql via ZFS snapshots
View zfs-backup-mysql.sh
#Just a small script I wrote to backup mysql via ZFS snapshots
#!/bin/sh
# Copyright (c) 2011 Vladislav V. Prodan <universite at ukr.net>
# My MySQL server uses the directory:
# tank/mysql # main directory MySQL
# tank/mysql/ibdata # data of InnoDB tables
# tank/mysql/iblogs # InnoDB transaction logs
View zfs_snapshot.sh
#!/bin/sh
#
# zfs snapshot auto-rotation
#
# usage: zfs_snapshot.sh <mountpoint> <snapshot name> <number of keeping snapshots> [recursive]
#
# recursive option: Recursively create snapshot (zfs snapshot -r)
#
# for crontab
#
You can’t perform that action at this time.