Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import http.client | |
TOKEN = 'yourAccessToken' | |
c = http.client.HTTPSConnection('slushpool.com', 443) | |
c.request('GET', '/stats/json/btc/', headers={'SlushPool-Auth-Token': TOKEN}) | |
r = c.getresponse() | |
w = r.readline() | |
j = json.loads(w) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from umqtt.simple import MQTTClient | |
import machine | |
import utime | |
import ntptime | |
import ubinascii | |
import sys | |
ESSID = "myWiFiSSID" | |
PWD = "myWiFiPassword" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import sys | |
import time | |
import base64 | |
from urllib.parse import urlparse, parse_qs | |
from threading import Thread | |
import paho.mqtt.client as mqtt | |
from http.server import BaseHTTPRequestHandler, HTTPServer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title=Crypto Monitor | |
author=m0nochr0me | |
orientation=landscape |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BOOT.PY | |
import gc | |
import network | |
import esp | |
esp.osdebug(None) | |
gc.collect() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gc | |
import network | |
import esp | |
esp.osdebug(None) | |
gc.collect() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=MQTT Desktop Agent | |
[Service] | |
ExecStartPre=/bin/sh -c 'until ping -c1 google.com; do sleep 1; done;' | |
ExecStart=python /home/yourusername/bin/mqtt-desktop-agent/mqtt-desktop-agent.py | |
[Install] | |
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEBUG = False | |
MQTTSRV = '192.168.0.10' | |
MQTTPORT = 19780 | |
MQTTUSER = 'mqttlogin' | |
MQTTPASS = 'MQttPassWord123' | |
INTERVAL = 2 | |
TOPIC_PREFIX = 'home/desktop/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pid_file /var/run/mosquitto.pid | |
persistence true | |
persistence_file mosquitto.db | |
persistence_location /opt/mosquitto/ | |
log_dest none | |
log_timestamp_format %Y-%m-%dT%H:%M:%S | |
log_type debug | |
log_type error | |
log_type warning | |
log_type notice |
NewerOlder