Posts

Showing posts from December, 2025

Useful aliases

alias ll="ls -lah" alias branch="git branch" alias checkout="git checkout" commit() { echo "Enter commit message (Ctrl+D to finish):" msg=$(cat) git commit -m "$msg" } add() { # Ensure git repo git rev-parse --is-inside-work-tree >/dev/null 2>&1 || return 0 # Colors GREEN="\e[32m" RED="\e[31m" YELLOW="\e[33m" CYAN="\e[36m" BOLD="\e[1m" RESET="\e[0m" local current_branch remote_branch behind local files file answer local added_files=() local skipped_files=() local temp_ignored_files=() local existing_temp_ignored=() current_branch=$(git branch --show-current) # ---------- STEP 0: Check existing temp-ignore files ---------- mapfile -t existing_temp_ignored /dev/null 2>&1 || { echo -e "${RED}Fetch failed.${RESET}" return 1 } behind=$(git rev-list --count HEAD.."$remote_branch" ...

Start all Docker containers

To start (bring up) all existing Docker containers , use this: docker start $(docker ps -aq) Explanation docker ps -aq → lists all containers (running or stopped) docker start → starts stopped containers If you are using Docker Compose From the directory with docker-compose.yml: docker compose up -d Or for multiple compose projects (containers already created): docker compose start Useful checks See all containers and their status: docker ps -a See only running containers: docker ps Common gotcha If you see access forbidden , it means: Image not pulled (private registry) Not logged in Login first: docker login Then retry: docker start $(docker ps -aq)  

Back up from Android to OneDrive with rclone

Backing up your Android device to OneDrive is easy using rclone . Even if your OneDrive account has two-factor authentication (2FA) , rclone works perfectly by authorizing once through a web browser. Step 1 — Install rclone in Termux pkg install rclone Step 2 — Configure OneDrive Run the following command: rclone config Answer the prompts as follows: New remote: n Name: onedrive Storage: OneDrive Client ID: press Enter Client Secret: press Enter Edit advanced config? n Use auto config? n (important on Android) After choosing No for auto config, rclone will show a long URL. Copy the URL Open it in your Android web browser Sign in to OneDrive and approve access Copy the verification code Paste it back into Termux Two-factor authentication works normally during this step. Step 3 — Test the OneDrive Connection rclone lsd onedrive: If your OneDrive folders appear, the setup is complete. Step 4 — Backup Using ...

Using NextDNS to block ad on Android

Here’s a full guide to understanding NextDNS — what it does, how to set it up on your Android device (and elsewhere), and tips to get the most out of it. What is NextDNS? NextDNS is a cloud-based DNS filtering and security service. According to its website, it: Blocks ads, trackers, malicious domains, phishing, cryptojacking and more. Works across all devices and networks (WiFi, mobile, public hotspots) Supports modern DNS encryption protocols (DNS-over-TLS, DNS-over-HTTPS) for better privacy. Provides customization: blocklists, allow-lists, content categories, parental controls, logging & analytics. In short: it works like a “smart hosts file + firewall” but at the DNS level, meaning you don’t need root or filesystem hacks. How to set up NextDNS on Android STEP 1 — Create your NextDNS profile Go to: https://my.nextdns.io Create an account (free) You will see a profile ID like: abcd12.dns.nextdns.io This ...