This file contains hidden or 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
#!/bin/bash | |
# Much of this script came from: | |
# https://gist.github.com/danielv99/ae6dbd6d3f5b8fe4241519f5a0733ff3 | |
# but a few hours of trial/error/debugging/chatgpt/grok went into the few changes required to get VPN working with my UDM | |
# YMMV | |
# My debugging went as followed: | |
# In one window, create this script, chmod +x it | |
# In another window, run `journalctl -u xl2tpd -f` to look for errors. | |
# if this doesn't just plain work for you, |
This file contains hidden or 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
#!/bin/bash | |
apt-get -y update && apt-get -y upgrade | |
apt-get -y install strongswan xl2tpd libstrongswan-standard-plugins libstrongswan-extra-plugins | |
service strongswan-starter stop | |
service xl2tpd stop | |
ipsec stop | |
VPN_SERVER_IP='<server ip>' |
This file contains hidden or 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 requests | |
from bs4 import BeautifulSoup | |
import sys | |
# This python script scrapes Ocean.xyz and creates a csv of the payouts to a given BTC address. | |
# | |
# it parses out: | |
# - 24h hash rate average | |
# - accepted 24h shares | |
# - stimated earnings/day |
This file contains hidden or 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 bs4 import BeautifulSoup | |
... | |
# Use Beautiful Soup to parse the HTML | |
soup = BeautifulSoup(html_content, 'html.parser') | |
# Find the table body | |
table_body = soup.find('tbody', id='hashrates-tablerows') |
This file contains hidden or 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 requests | |
import datetime | |
from bs4 import BeautifulSoup | |
import sys | |
# This python script scrapes Ocean.xyz and creates a csv of the payouts to a given BTC address. | |
# | |
# This will be useful for anyone mining on Ocean.xyz who wants to keep track of their earnings in BTC or USD | |
# | |
# Example output: |
This file contains hidden or 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 time | |
import datetime | |
import requests | |
import copy | |
MEMPOOL_HOST = "umbrel.local:3006" | |
MEMPOOL_PROTOCOL = "http" | |
DEBUGGING = False | |
SLEEP_BETWEEN_LEVELS = 0 | |
SLEEP_BETWEEN_BUCKETS = 1 |
This file contains hidden or 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 requests | |
from requests.auth import HTTPDigestAuth | |
TEN_MINUTES_IN_SECONDS = 60 * 10 | |
HIGH_LSTIME_IN_SECONDS = 120 | |
session = requests.Session() | |
class S19Miner: |
This file contains hidden or 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
# Use this python script to create orders at percentage-intervals below the current market price of BTCUSD | |
# The percentage dips you'd like to purchase can be specified in the variable PERCENTAGE_DIPS | |
# by default, the values represent 1.5%, 2.5%, 4%, 5%, 7%, 8.5%, 10%, 12.5% below the current spot price. | |
# You can add/subtract values from the PERCENTAGE_DIPS array | |
# and your available balance will be split evenly amongst those percentages | |
# | |
# Tips are welcomed. Please send a few satoshi to: | |
# | |
# bc1qzknc4p68hdffxkk3n6wd27uh09ys9flxrudrjw | |
# |