/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

blog.exupero.org
| | ericlathrop.com

I often need to view a bunch of static HTML files in my browser locally, and I often need to open them with http:// rather than file:// URLs so related CSS or JavaScript files load correctly. Luckily, Python provides a simple web server, and most Linux distros include Python.
20.6 parsecs

Travel
| |
| | willhaley.com

See here an example of a custom Linux mount script, written in Python, that can be used to mount disks with /etc/fstab. The mount script is installed at /usr/bin/mount.my-command and is executable. #!/usr/bin/env python3 import sys import subprocess device = sys.argv[1] mount_point = sys.argv[2] options = sys.argv[4] # Any customization could be done here to the `mount` command that is run. mount_command = ['mount', '-o', options, device, mount_point] output = subprocess.run( mount_command, capture_output=True ) if output.returncode != 0: print("error mounting") print(output.stderr.decode('UTF-8')) sys.exit(output.returncode) See here how the custom script can then be used in /etc/fstab like any "normal" mount.
22.4 parsecs

Travel
| |
| | stevenirby.me

[AI summary] The author shares a simple bash script and cronjob setup to automatically send desktop notifications reminding them to log their food intake.
24.5 parsecs

Travel
| |
| | www.fyears.org


34.8 parsecs

Travel
|