Skip to content

Instantly share code, notes, and snippets.

@erickclasen
erickclasen / dell-clearance-alert.sh
Last active September 7, 2023 21:23
This shell script is designed to periodically check a specific Dell Refurbished Clearance page for the availability of workstation towers with a minimum of 64GB RAM and no operating system (NO-OS). Runs a loop in the background cand be started using @reboot to the command on startup. Sends local email to the system, can be modified to do some ot…
#!/bin/bash
#-user-agent sets the User-Agent header in the HTTP request to mimic a web browser. In this example, it is set to simulate Google Chrome on Windows 10.
#--quiet suppresses unnecessary output from wget, showing only the content of the page.
#-O - redirects the output of wget to the standard output instead of saving it to a file.
#Not sure if user-agent is required or not, but playing it safe and assuming bots are not welcome.
@erickclasen
erickclasen / multi-pow-hash-of-string.py
Created May 6, 2022 02:19
Demonstrates SHA256 hashing. Shows a basic proof of work example as well.
'''
Original seed idea from
https://www.pythoncentral.io/hashing-strings-with-python/
'''
import hashlib
from datetime import datetime
mystring = input('Enter String to hash: ')
# Assumes the default UTF-8
hash_object = hashlib.sha256(mystring.encode())