social fix, logo fix, removed leftovers

This commit is contained in:
Firq 2023-03-10 22:33:09 +01:00
parent 2dd9ff9ed8
commit a3022d8a49
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
10 changed files with 5 additions and 57 deletions

3
.gitignore vendored
View file

@ -3,6 +3,9 @@ dist/
.output/
public/
# Temp Scripts
scripts/
# dependencies
node_modules/

2
scripts/.gitignore vendored
View file

@ -1,2 +0,0 @@
venv/
.idea/

View file

@ -1,52 +0,0 @@
import sys, logging, ipaddress, json
import CloudFlare
def main(TOKEN, NEW_IP):
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
cf = CloudFlare.CloudFlare(token=TOKEN)
zones = cf.zones.get()
zone_identifier = []
for zone in zones:
if zone['name'] == "firq.dev":
zone_identifier = zone
if not zone_identifier:
raise Exception("No Zone identifier extracted")
logging.info(f" Zone Identifier is {zone_identifier['id']}")
records = cf.zones.dns_records.get(zone_identifier['id'])
update_records = []
if not records:
raise Exception(f"Could not extract records from {zone_identifier['name']}")
for record in records:
if record['type'] == 'AAAA':
update_records.append({"id": record['id'], "type": record['type'], "name": record['name'], "content": record['content']})
logging.info(f" Got the following DNS records registered to {zone_identifier['name']}")
logging.info(json.dumps(update_records, sort_keys=True, indent=2))
records_done = 0
for record in update_records:
data = {
"name": record['name'],
"type": record['type'],
"content": NEW_IP
}
try:
cf.zones.dns_records.patch(zone_identifier['id'], record['id'], data=data)
records_done += 1
except Exception as e:
logging.error(e)
logging.info(f"Finished updating {records_done} records for {zone_identifier['name']}")
if __name__ == '__main__':
assert len(sys.argv) == 3
assert isinstance(ipaddress.ip_address(sys.argv[2]), ipaddress.IPv6Address), \
f'IP {sys.argv[2]} is not a valid IPv4 address'
main(sys.argv[1], sys.argv[2])

View file

@ -1 +0,0 @@
cloudflare>=2.11.1

View file

@ -35,7 +35,7 @@ if (currentpage !== 'home') {
<meta property="og:url" content={currPage} />
<meta name="description" content={description} />
<meta property="og:description" content={description} />
<meta property="og:image" content="https://firq.dev/embed.png" />
<meta property="og:image" content="/embed.png" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<title>{title}</title>

View file

@ -51,7 +51,7 @@
>his site here</a
>
<div class="sticky-image-wrapper">
<img src="/archbtw.png" alt="" />
<img src="/fedora.png" alt="" />
</div>
</div>
<br />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB