Skip to content

Instantly share code, notes, and snippets.

View D4rk4's full-sized avatar
🏠
Working from home

Dmitry Galenko D4rk4

🏠
Working from home
View GitHub Profile
@D4rk4
D4rk4 / install-ubuntu.sh
Created May 22, 2018 10:44 — forked from vrivellino/install-ubuntu.sh
Install Ubuntu 18.04: ZFS on encrypted drives with USB boot disk
#!/usr/bin/env bash
# Adapted from https://github.com/zfsonlinux/zfs/wiki/Ubuntu-18.04-Root-on-ZFS
# Should be executed from a live CD environment
set -e
## CONFIG VARS
set -x
# Disk drive ids (symlinks in /dev/disk/by-id)
bootdisk='usb-SanDisk_Cruzer_AAAAAAAAAAAAAAAAAAAA-0:0'
rdisk1='ata-SanDisk_SDSSDHII120G_AAAAAAAAAAAA'
deb http://hwraid.le-vert.net/debian stretch main
#install dirmgr
apt-get install dirmngr
#add key
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6005210E23B3D3B4
apt-get update && apt-get install -y megacli
@D4rk4
D4rk4 / smstools3.md
Created December 14, 2017 16:44 — forked from codexss/smstools3.md
Openwrt/LEDE smstools3 forward sms to telegram
opkg update
opkg install kmod-usb-serial kmod-usb-serial-wwan kmod-usb-serial-option usb-modeswitch smstools3 curl iconv

vi /usr/local/bin/pushsms

#!/bin/sh
@D4rk4
D4rk4 / zfs_revert-0.1.py
Created November 11, 2017 23:01
Revert ZFS changes by destroying uberblocks
#!/usr/bin/python
# -*- coding: utf-8 -*-
#Script for reverting ZFS changes by destroying uberblocks
#Author: Martin Vool
#E-mail: [email protected]
#Version: 0.1
#Date: 16 November 2009
#!/bin/bash
DATE="$(date '+%Y.%m.%d, %I:%M:%Ss')"
# Interface
INET_NAME="eth0"
PING_CHECK_STATE="/opt/scripts/ping.state"
PING_CHECK_REBOOT_LOG="/var/log/ping_check_reboot.log"
PING_CHECK_SUCESS_LOG="/var/log/ping_check_sucess.log"
[Unit]
Description=GlusterFS mount
Wants=network.target glusterfs-server.service
After=network.target glusterfs-server.service
[Mount]
What=127.0.0.1:/shared-www
Where=/srv/www
Type=glusterfs
Options=defaults