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 -e | |
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| # Extract any bundled .tar.xz archives into the current working directory | |
| shopt -s nullglob | |
| for archive in "$PWD"/*.tar.xz "$SCRIPT_DIR"/*.tar.xz; do | |
| [ -e "$archive" ] || continue | |
| echo "Extracting $(basename "$archive") into $PWD" |
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 | |
| if [[ $# -eq 0 ]]; then | |
| echo "Usage: twitch channel1 channel2 ..." | |
| exit 1 | |
| fi | |
| # --- Detect Default Browser --- | |
| detect_default_browser() { | |
| local default_browser="" |
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 | |
| # Proton Drive Incremental Sync | |
| # Syncs ~/ProtonSync → /my-files/Sync | |
| set -uo pipefail | |
| DRIVE_BIN="/usr/local/bin/proton-drive" | |
| LOCAL_DIR="$HOME/ProtonSync" | |
| DRIVE_BASE="/my-files/Sync" |
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 | |
| # ------------------------------------------------------------ | |
| # batch_image_convert.sh – batch‑scale images and set 72 dpi. | |
| # Supports: HEIC, JPG/JPEG, PNG → always saved as JPG. | |
| # | |
| # Options: | |
| # -d <dir> Source directory (default: current directory) | |
| # -s <pct> Resize percentage (e.g. 25%). Default: 50% | |
| # ------------------------------------------------------------ |
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 | |
| # Function to print colored output | |
| print_green() { echo -e "\033[32m$1\033[0m"; } | |
| print_red() { echo -e "\033[31m$1\033[0m"; } | |
| print_yellow() { echo -e "\033[33m$1\033[0m"; } | |
| echo "--- WiFi Network Scanner (Radio Activation Fix) ---" | |
| # Enable WiFi radio via NetworkManager |
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 | |
| rm -rf ~/.local/share/Trash/* | |
| # Add this as a startup script to your Linux OS |
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 | |
| # Configuration variables | |
| API_URL="https://<owncast-server>/api/status" | |
| M3U8_STREAM_URL="https://<owncast-server>/hls/0/stream.m3u8" | |
| RECORDINGS_DIR="<path-to-store-recordings>" | |
| FILE_NAME_PREFIX="stream_" | |
| # Function to check if stream is online | |
| is_stream_online() { |
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
| export default { | |
| async fetch(request) { | |
| const primaryUrl = 'https://api.example.com'; | |
| const fallbackUrl = 'https://api2.example.com'; | |
| const url = new URL(request.url); | |
| const path = url.pathname + url.search; | |
| // Define CORS headers | |
| const corsHeaders = { |
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
| export default { | |
| async fetch(request) { | |
| const primaryUrl = 'https://api.example.com'; | |
| const fallbackUrl = 'https://api2.example.com'; | |
| const url = new URL(request.url); | |
| const path = url.pathname + url.search; | |
| // Try primary | |
| try { |
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 | |
| # enable / disable all UVC devices/cameras | |
| # No arguments - auto‑toggle based on whether the uvcvideo module is loaded | |
| # on = force load the driver | |
| # off = force unload the driver | |
| if [[ -z "$DISPLAY" ]]; then | |
| export DISPLAY=:0 | |
| fi |
NewerOlder