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 / 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: mardicas@gmail.com
#Version: 0.1
#Date: 16 November 2009
@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 / 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'
@D4rk4
D4rk4 / zfs-on-root
Created June 20, 2018 20:53 — forked from overdeliver/zfs-on-root
zfs-on-root
#!/bin/bash -e
#
# debian-stretch-zfs-root.sh V1.00
#
# Install Debian GNU/Linux 9 Stretch to a native ZFS root filesystem
#
# (C) 2017 Hajo Noerenberg
#
#
# http://www.noerenberg.de/
@D4rk4
D4rk4 / bitcoind.service
Last active June 21, 2018 10:35 — forked from mariodian/bitcoind.service
Bitcoind Systemd script
[Unit]
Description=Bitcoin's distributed currency daemon
After=network.target
[Service]
User=bitcoin
Group=bitcoin
Type=forking
PIDFile=/srv/blockchain/bitcoin/bitcoind.pid
@D4rk4
D4rk4 / parity.service
Last active June 21, 2018 13:24 — forked from AntoniosHadji/parity.service
systemd unit file for parity with clean exits
[Unit]
Description=Parity Daemon
After=network.target
[Service]
User=parity
Group=parity
ExecStart=/usr/bin/parity \
--fat-db on --db-compaction auto --base-path /srv/blockchain/parity/ --mode active \
@D4rk4
D4rk4 / improved-lnd-bitcoind-mainnet.md
Created June 25, 2018 10:57 — forked from tiero/improved-lnd-bitcoind-mainnet.md
Detailed guide to installing LND and Bitcoind on Ubuntu 16.04 LTS for Mainnet

Intro

This guide is specific to getting LND 0.4.1-beta and Bitcoind running on Ubuntu 16.04 LTS for mainnet.

Original installation guide:

This guide is broken into the following sections:

  • Install bitcoind and set to start automatically
  • Install development tools and dependancies
@D4rk4
D4rk4 / kmskeys10.txt
Last active July 11, 2021 17:28 — forked from CHEF-KOCH/kmskeys10.txt
Windows 10 KMS Keys
Windows.10.and.Office.2016.gVLK
#####################################################################
Error
“Error: 0xC004F069 On a computer running Microsoft Windows non-core edition, run ‘slui.exe 0x2a 0xC004F069’ to display the error text”
Solution
Find available target editions
DISM.exe /Online /Get-TargetEditions
A. Create Installation DVD ISO Via Dism:
1. Extract Win 10 Enterprise version of the mirror sources folder install.wim to D drive temp directory
2. In the temp directory to create WimMount folder, and execute the following command to mount the wim file
Dism /Mount-Wim /WimFile:D:\temp\install.wim /Index:1 /MountDir:D:\temp\WimMount
3. Show the current version
Dism /Image:D:\temp\WimMount /Get-CurrentEdition
4. Show current version
Dism /Image:D:\temp\WimMount /Get-TargetEditions
@D4rk4
D4rk4 / 99-keepwanalive
Last active May 22, 2019 21:15 — forked from navhaxs/99-keepwanalive
openwrt wan auto reconnect hotplug script
#!/bin/bash
# Place me in /etc/hotplug.d/iface/99-keepwanalive
IFNAME='wlan0'
if [ "$ACTION" = "ifdown" -a "$INTERFACE" = "$IFNAME" ]; then
COUNTER=0
PASS=0
while [ $PASS -eq 0 ]