Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

trick77

🎯
Focusing
Block or report user

Report or block trick77

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
View result.log
This file has been truncated, but you can view the full file.
[nodemon] 1.18.9
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node ./app.js`
count=1, timestamp=1/3/2019, 6:17:12 AM (EST), height=1851222, txCount=0, txsListSize=0, twsListSize=0, txFeeBase=0, txDistanceSumLimit=0, miner=0x069caa5b07f52dfad4b0a3bbee1bf956d65f908a
count=2, timestamp=1/3/2019, 6:17:25 AM (EST), height=1851223, txCount=0, txsListSize=0, twsListSize=0, txFeeBase=0, txDistanceSumLimit=0, miner=0x88f0e154482894387a3f8ba555da07b53382be58
count=3, timestamp=1/3/2019, 6:17:43 AM (EST), height=1851224, txCount=0, txsListSize=0, twsListSize=0, txFeeBase=0, txDistanceSumLimit=0, miner=0x34d0c4b7f5f72690b441f6f6a50b6f81401cbdce
count=4, timestamp=1/3/2019, 6:17:45 AM (EST), height=1851225, txCount=0, txsListSize=0, twsListSize=0, txFeeBase=0, txDistanceSumLimit=0, miner=0x1bd4f5ebe0b44605204e8587cfed49086fbc07c6
View hostapd.conf
interface=wlan0
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=MyWIFIid
country_code=CH
hw_mode=a
View modeswitch.sh
#!/bin/sh
sysctl net.ipv4.ip_forward=1
sysctl net.ipv4.ip_default_ttl=65
/usr/sbin/usb_modeswitch -v12d1 -p1f01 -J
sleep 5
/sbin/dhclient -1 -v -pf /run/dhclient.eth3.pid -lf /var/lib/dhcp/dhclient.eth3.leases -I -df /var/lib/dhcp/dhclient6.eth3.leases eth3
/sbin/iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE
/bin/systemctl restart hostapd
exit 0
View 10-sysinfo
#!/bin/bash
#
# 10-sysinfo - generate the system information
# Copyright (c) 2013 Nick Charlton
#
# Authors: Nick Charlton <hello@nickcharlton.net>
#
# 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 2 of the License, or
View 00-header
#!/bin/sh
#
# 00-header - create the header of the MOTD
# Copyright (c) 2013 Nick Charlton
# Copyright (c) 2009-2010 Canonical Ltd.
#
# Authors: Nick Charlton <hello@nickcharlton.net>
# Dustin Kirkland <kirkland@canonical.com>
#
# This program is free software; you can redistribute it and/or modify
@trick77
trick77 / 20-updates
Created Jun 3, 2018
Working 20-updates for motd
View 20-updates
#!/usr/bin/python3
#
# 20-updates - create the system updates section of the MOTD
# Copyright (c) 2013 Nick Charlton
#
# Authors: Nick Charlton <hello@nickcharlton.net>
# Based upon prior work by Dustin Kirkland and Michael Vogt.
#
# 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
@trick77
trick77 / rigcheck.sh
Last active Apr 5, 2019
Checks for crashed ethOS 1.2.9 mining processes
View rigcheck.sh
#!/bin/bash
#
# Minimalistic auto-reboot script for ethOS 1.2.9 - 1.3.1
# https://trick77.com/auto-restart-crashed-mining-processes-ethos
#
# This script will automatically reboot the mining rig depending on the reported
# mining status in ethOS.
# - The script should be triggered every 15 minutes from a cron job. Do not run it in shorter intervals.
# - May or may not work with other ethOS versions than indicated above.
#
@trick77
trick77 / rigcheck.sh
Last active Aug 14, 2018
Checks for crashed ethOS mining processes
View rigcheck.sh
#!/bin/bash
LOG_FILE=/tmp/rigcheck.log
if grep -qv active /var/run/ethos/status.file; then
echo "$(date) Mining not active or currently starting, exiting..." | tee -a ${LOG_FILE}
exit 0
fi
NUM_PROC=`ps uax| egrep "ccminer|cgminer-skein|claymore|dstm-zcash|ethminer|ethminer-amd|ewbf-zcash|sgminer-gm|silentarmy|optiminer-zcash" | grep -v "curl" | grep -v "update-miner" | grep -v grep | awk '{print $2}' | wc -l`
NUM_GPU=`cat /var/run/ethos/gpulist.raw | wc -l`
NEEDS_RESTART=false
if [ "${NUM_PROC}" != "${NUM_GPU}" ]; then
@trick77
trick77 / monero.3m.sh
Created Sep 24, 2017
Bitbar script for Monero/€ pair with currency icon
View monero.3m.sh
#!/bin/sh
moneroIconBase64='iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAActpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+QWRvYmUgSW1hZ2VSZWFkeTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KKS7NPQAAAWhJREFUOBGFk9sqRVEUhpfDlXgGV65cEUoewYt4ARcUIqFcuCCnh5GQYzldCC9AKSSS7fh9a82xWu3IX98e4x9zjjnXmnPtLCvUmKKhD5bhFF4S58Q1cCxU9kTSxMg6fP/DKuPOVdGbNWA2wOYPqKX4RZSofZI7ZxOaodQSWewcTeEj1td9pVxd/DppGyZS7k42VJtj9ynqW2msh5jF7jsaNAk2+tixq7m1aVDO1a9ojpPZ1yTFIu94z8PJc2nMcADWTjRPycQCHqiaASf
@trick77
trick77 / ether.3m.sh
Created Sep 24, 2017
Bitbar script for Ether/€ pair with currency icon
View ether.3m.sh
#!/bin/sh
ethIconBase64='iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAAgRJREFUOBFdU71KA0EQvtu7PbmQCDGx0VgpWAQUCUTSXaONaHc+gY1PYGORB7Cz0FPsLGx9AQXfwYBFQPAZJL936/ets0d0YG/mvpnZ+V3PA3U6HU1OiuN4HyzzfX8APsIZi5zFse7i31LpUwqAtdb3YEYp38DJ/MpKeIllaZpGvCVNvcCnQAqC4DXP8wSOOX6nxphY6+BpNssVsFNgI2CRUiooiuI1SZJDnIK+ZWQYjnAIIgs1B2+ura1sQHYYOW0MAjLbsmamPKcC0BQO5BfUC10GgcWmtKEtcIN+2Z5kUvMU4Fyc39kb159erxdD97Hg7IJkHsABFeLM+k2tVjsGJ4VJ0q5SqFSWThgIIoNYO8iclDfBYc0zckzikSAoQgYVcCWc2KNkOJNs6OtNBMwJojnPwA6o+EdHomMPcslmwh
You can’t perform that action at this time.