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
#!/usr/bin/env bash | |
# Just comment this out to run the script within the target directory. | |
cd /mnt/example || exit 1 | |
for f in *; do | |
lower="$(echo "$f" | tr '[:upper:]' '[:lower:]')" | |
if [[ "$f" != "$lower" ]]; then | |
if [[ -e "$lower" ]]; then |
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 | |
# update `/search/path/dir`, `/old/link/path`, and `/new/link/path` | |
find /search/path/dir -type l | while read link; do | |
target=$(readlink "$link") | |
if [[ "$target" == "/old/link/path"* ]]; then | |
suffix="${target#/old/link/path}" | |
newtarget="/new/link/path$suffix" | |
echo "Updating: $link -> $newtarget" | |
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 | |
set -euo pipefail | |
IFS=$'\n\t' | |
# Path to the data disk | |
DATA_DISK="/mnt/data" | |
WHEELHOUSE_PATH="$DATA_DISK/wheelhouse" | |
PIP_CONF_PATH="$DATA_DISK/pip/pip.conf" | |
mountpoint -q "$DATA_DISK" || { echo "Error: $DATA_DISK not mounted"; exit 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
////////////////////////////////////////////////////////////////////////////// | |
// Stellarium Script: Mercury Twilight Search | |
// Date Range: Feb 10, 2025 – Apr 30, 2025 | |
// Time Step: 5 minutes | |
// Location: Miami (lat: 25.7617, lon: -80.1918), ignoring DST complexities. | |
////////////////////////////////////////////////////////////////////////////// | |
// ------------------------ USER CONFIGURATION ------------------------ | |
// Observing location |
OlderNewer