Skip to content

Instantly share code, notes, and snippets.

cd C:\Users\MINER02\Downloads\nvflash_5.567.0
nvflash64.exe --list
nvflash --index=X bios.rom
nvflash --index=X -6 bios.rom
-6 for id mismatch
@whoamiTM
whoamiTM / miniZ_findshare.bat
Created February 2, 2020 04:05
Sends PushOver notification when share is found solo mining with MiniZ
@ECHO
SETLOCAL ENABLEDELAYEDEXPANSION
:start
timeout.exe /T 1800
FOR /F "tokens=2-8 delims=.:/ " %%A in ("%date% %time%") DO SET DateNtime=%%D:%%E:%%F
FOR /F "tokens=1-4 delims= " %%A IN ('findstr.exe /I /R /C:"S: 1/0" miniZ.log') DO (
SET share=%%D
)
echo !share! | find "1/0" > nul
@whoamiTM
whoamiTM / sysctl.conf
Created January 12, 2020 18:56
sysctl.conf for dual stack IPv4 & IPv6 VPN
# For binary values, 0 is disabled, 1 is enabled.
# To save changes run command sysctl -p
# For more information, see sysctl.conf(5) and sysctl.d(5).
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
# Controls IPv6 packet forwarding
net.ipv6.conf.all.forwarding = 1
@whoamiTM
whoamiTM / default.fw
Created December 28, 2019 19:52
default iptables / ip6tables firewall rules
#
#######################################################################
# iptables rules
#######################################################################
#
# Flush current V4 polices
iptables -t nat -F
iptables -t mangle -F
iptables -F
iptables -X
@whoamiTM
whoamiTM / miner_watchdog.sh
Last active December 28, 2019 19:40
Script to ping mining rigs and send reboot via Empress + PushOver notification running on Raspberry Pi
#!/bin/bash
# Miner Watchdog
# Miners Name Hostname
miners[0]="miner01;miner01.local"
miners[1]="miner02;miner02.local"
miners[2]="miner03;miner03.local"
miners[3]="miner04;miner04.local"
# How often the script checks if rig is frozen (in minutes)
#!/usr/bin/env python3
# Power/Reset Control of Systems via GPIO
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@whoamiTM
whoamiTM / miner_watchdog.service
Created July 3, 2019 23:38
systemd unit file for miner_watchdog.sh to start service at boot
[Unit]
Description=Mining Watchdog
After=network.target
[Service]
ExecStart=/bin/bash -c "/usr/local/bin/mining_watchdog.sh | tee /home/whoami/mining_watchdog.log"
StandardOutput=inherit
StandardError=inherit
Restart=always
User=whoami
@whoamiTM
whoamiTM / dnsmasq.conf
Last active October 3, 2018 01:54
dnsmasq for dual stack SoftEther VPN
##################################################################################
# SoftEther VPN server dnsmasq.conf
################################################################################## Interface Settings
# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
# Repeat the line for more than one interface.
interface=tap_soft
@whoamiTM
whoamiTM / vpnserver.sh (bridge)
Last active October 3, 2018 01:56
/etc/init.d/vpnserver [SoftEther VPN]
#!/bin/sh
### BEGIN INIT INFO
# Provides: vpnserver
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: SoftEther VPN Server
### END INIT INFO
@whoamiTM
whoamiTM / softether_bridge.fw
Last active October 6, 2018 19:45
v.4 & 6 Firewall Rules For SoftEther Bridge
#!/bin/bash
#
#######################################################################
# iptables rules
#######################################################################
#
# Flush current V4 polices
iptables -t nat -F
iptables -t mangle -F
iptables -F