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 | |
| # API Key Sign Up Page: https://www.thetvdb.com/api-information | |
| # Official v4 API Documentation: https://thetvdb.github.io/v4-api/ | |
| # 1. Configuration | |
| API_KEY="your-api-key-here" | |
| SERIES_NAME="Star Trek Voyager" | |
| SERIES_YEAR="1995" | |
| SEASON_NUMBER="2" | |
| EPISODE_NUMBER="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
| #!/bin/bash | |
| # ----------------------------------------------------------------------------- | |
| # sudo.sh | |
| # | |
| # Description: | |
| # A lightweight "dummy" sudo wrapper designed for proot-distro, Termux, or | |
| # containerized environments where the standard sudo binary is missing. | |
| # | |
| # Behaviour: | |
| # - If running as root (EUID 0): Executes commands immediately and silently. |
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 zsh | |
| # ----------------------------------------------------------------------------- | |
| # wakeonlan.sh | |
| # | |
| # Send a Wake-on-LAN (WOL) packet to a target machine via an always-on | |
| # Linux host. | |
| # | |
| # Many computers that are powered off cannot receive WOL packets from | |
| # outside their local network, e.g. when using Zerotier or Tailscale | |
| # VPN. This script solves that problem by SSHing into a machine that |
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 | |
| # ----------------------------------------------------------------------------- | |
| # getmacaddress.sh | |
| # | |
| # Retrieve the MAC address of a network interface on a local or remote host. | |
| # | |
| # The script connects to the specified host (via SSH if the host is not the | |
| # local machine) and attempts to retrieve the MAC address of the specified | |
| # network interface. | |
| # |
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 | |
| set -euo pipefail | |
| OUTDIR="converted" | |
| SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | |
| cd "$SCRIPT_DIR" | |
| # Load .env if present (simple KEY=VALUE lines) | |
| ENV_FILE="$SCRIPT_DIR/.env" |
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
| Step-by-Step Instructions (macOS) | |
| PowerPoint on Mac hides the coding tools by default. Here is how to set it up and use the script: | |
| 1. Enable the Developer Tab | |
| Open PowerPoint. | |
| Click PowerPoint in the top menu bar (top left of your screen) and select Preferences... | |
| Click on Ribbon & Toolbar. |
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
| # https://github.com/chubin/wttr.in | |
| # sudo nano /usr/local/bin/weather | |
| # sudo chmod +x /usr/local/bin/weather | |
| # ------- paste below then run with `weather` ------- # | |
| #!/bin/bash | |
| curl wttr.in |
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
| # History prefix search | |
| bindkey '^[[A' history-search-backward | |
| bindkey '^[[B' history-search-forward | |
| # Colourised commands | |
| alias ls='ls -G' | |
| alias grep='grep --color=auto' | |
| alias diff='diff --color=auto' | |
| export LESS='-R' | |
| export LSCOLORS=GxFxCxDxBxegedabagaced |
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 | |
| set -euo pipefail | |
| APP_NAME="Zotero.app" | |
| APP_PATH="/Applications/${APP_NAME}" | |
| TMP_DMG="/tmp/Zotero_latest.dmg" | |
| DOWNLOAD_URL="https://www.zotero.org/download/client/dl?channel=release&platform=mac" | |
| # Quit Zotero if running |
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
| -- Automator version | |
| -- usage: | |
| -- 1. Create new Quick Action in macOS Automator | |
| -- 2. Workflow receives current "image files" in "Finder" | |
| -- 3. Add "Run Applescript" | |
| -- 4. Paste this code | |
| -- 5. Now you can right-click on an image or multiple images in Finder to extract the text to .txt files. | |
| use framework "Vision" | |
| use framework "Foundation" |
NewerOlder