Skip to content

Instantly share code, notes, and snippets.

@daisyUniverse
Last active May 11, 2026 17:07
Show Gist options
  • Select an option

  • Save daisyUniverse/fa21fdd8233d6f10ccfc7509818084f7 to your computer and use it in GitHub Desktop.

Select an option

Save daisyUniverse/fa21fdd8233d6f10ccfc7509818084f7 to your computer and use it in GitHub Desktop.
Check to see if Fluxer's self hosting page has updated yet
# is fluxer self hosting out?
# Simple flask server that checks if we can stop using discord
# Daisy Universe [S]
# 05 . 11 . 26
from flask import Flask, send_from_directory, jsonify
from flask_cors import CORS, cross_origin
import requests
import hashlib
from datetime import datetime
app = Flask(__name__)
cors = CORS(app)
app.config['CORS_HEADERS'] = 'Content-Type'
old_hash = 'f636994f4111df7634697acf685e7fd8'
def getStatus(getmd5=False):
x = requests.get('https://docs.fluxer.app/self-hosting')
current_hash = hashlib.md5(x.text.encode()).hexdigest()
print(current_hash)
if getmd5 is True:
return current_hash
if current_hash != old_hash:
return True
else:
return False
def styled_response(text, current_hash):
py_dt = datetime.now()
now = py_dt.strftime("%Y-%m-%d %H:%M:%S")
if current_hash != old_hash:
guess = "Probably "
else:
guess = "Probably not "
return f'''
<html>
<head><link rel="stylesheet" href="/static/style.css">
<Title> Did they release Self-Hosting to Fluxer yet? </Title>
<meta content="Did they release Self-Hosting to Fluxer yet?" property="og:title"/>
<meta content="According to the MD5 checksum of the self-hosting document page, {guess} \n\nOld MD5: \n{old_hash}\nCurrent MD5: \n{current_hash}\n\nData retrieved on {now}\n\n (you can enter some jibberish after adding # to the end of the url to get a new embed)" property="og:description"/>
<meta content="https://gist.github.com/daisyUniverse/fa21fdd8233d6f10ccfc7509818084f7" property="og:url"/>
<meta content="https://github.com/fluxerapp/fluxer/raw/refactor/media/logo-graphic.png" property="og:image"/>
<meta content="#0099ff" property="theme-color"/>
<meta content="FluxerSelfHosting" property="og:sitename"/>
<meta name="twitter:card" content="summary_large_image"/>
</head>
<body>{text}</body>
</html>
'''
@app.route('/')
def default():
current_hash = getStatus(True)
if current_hash != old_hash :
msg = 'maybe! <a href="https://docs.fluxer.app/self-hosting">fluxer docs</a> md5sum is different!'
else:
msg = 'probably not :( <a href="https://docs.fluxer.app/self-hosting">fluxer docs</a> md5sum hasnt changed'
return styled_response(msg, current_hash)
@app.route('/simple/')
def simple():
current_hash = getStatus(True)
if current_hash != old_hash :
return jsonify(
guess = True,
old_md5 = 'f636994f4111df7634697acf685e7fd8',
current_md5 = current_hash )
else:
return jsonify(
guess = False,
old_md5 = 'f636994f4111df7634697acf685e7fd8',
current_md5 = current_hash )
@app.route("/static/<path:filename>")
def assets(filename):
return send_from_directory("/home/daisy/isfluxerselfhostingout/static/", filename)
if __name__ == "__main__":
app.run(host='0.0.0.0', port=2026)
body {
background-color: #1a1a1b;
color: white;
margin: 1;
display: grid;
place-items: center;
margin-top: 33.3vh;
height: 33.3vh;
font-family: system-ui, sans-serif;
font-size: 5vw;
letter-spacing: 1;
font-weight: bold;
text-align: center;
padding: 20px;
overflow:hidden;
}
a {color: pink;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment