Posts

Showing posts from December, 2025

Useful aliases

alias ll="ls -lah" alias branch="git branch" alias checkout="git checkout" add() { # Colors GREEN="\033[32m" RED="\033[31m" YELLOW="\033[33m" BLUE="\033[34m" RESET="\033[0m" # Arrays for summary added_files=() skipped_files=() # Get changed files (including renamed, deleted, etc.) mapfile -t files commit() { echo "Enter commit message (Ctrl+D to finish):" msg=$(cat) git commit -m "$msg" } git_push() { # Colors RED="\033[0;31m" GREEN="\033[0;32m" CYAN="\033[0;36m" YELLOW="\033[1;33m" NC="\033[0m" CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" git fetch origin "$CURRENT_BRANCH" >/dev/null 2>&1 echo -e "${CYAN}Commits to push on $CURRENT_BRANCH:${NC}" git log origin/$CURRENT_BRANCH..$CURRENT_BRANCH --oneline || echo "No upstream ...

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 (based on your recent Docker issues) 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 ...