Skip to content

Instantly share code, notes, and snippets.

View AnythingLinux's full-sized avatar
🏠
Working from home

Masum AnythingLinux

🏠
Working from home
View GitHub Profile
@AnythingLinux
AnythingLinux / ai.txt generator
Last active September 9, 2026 19:08
AI.TXT Generator for Linux
#!/usr/bin/env python3
"""
generate_ai_txt.py
School Of Freelancing
AI.TXT generator + relative HTML prefetch discovery
Website:
https://schooloffreelancing.com
@AnythingLinux
AnythingLinux / Sitemap Generate RFC 3986 RFC 3987 XML safety Standard
Last active September 7, 2026 20:25
Sitemap Generate RFC 3986 RFC 3987 XML safety checks
#!/usr/bin/env python3
"""
generate_sitemap.py — Canonical-first, RFC 3986/3987 XML Sitemap Generator & Validator
Usage:
python3 /root/script/generate_sitemap.py --apply
"""
import argparse
import datetime
@AnythingLinux
AnythingLinux / Production-ready Google Search Console Diagnostic script
Last active September 12, 2026 16:16
Google Search Console Diagnostic script
#!/usr/bin/env python3
"""
Production Google Search Console Diagnostic
============================================
Target:
https://schooloffreelancing.com
GSC property:
sc-domain:schooloffreelancing.com
#!/usr/bin/env python3
"""
generate_llms_txt.py
Scans /var/www/html/ for HTML files, builds llms.txt (v2 spec, concise index)
and llms-full.txt (concise index + description for every page), runs a dry
run first, applies the write, validates the output, deletes .bak files,
restarts Apache, and produces a report.
Usage:
@AnythingLinux
AnythingLinux / How To Install Apache web server on an Ubuntu 24.04 LTS Server
Last active September 1, 2026 22:48
Install Apache web server on an Ubuntu 24.04 LTS Server
apt update
apt upgrade
apt install git
git config --global user.name "masum"
git config --global user.email "linuxguns@gmail.com"
ssh-keygen -t rsa -b 4096 -C "linuxguns@gmail.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
cat /root/.ssh/id_rsa.pub
apt install apache2
@AnythingLinux
AnythingLinux / Prompt Markdown Instructions (.md Files)
Last active August 31, 2026 03:09
Create Prompt Markdown Instructions (.md Files)
#!/usr/bin/env python3
"""
html_to_ai_markdown.py
Convert every index.html/index.htm in a static HTML website to index.md.
Workflow:
1. Performs a complete dry-run test across all target files.
2. If dry-run passes, generates and applies index.md files.
3. Validates generated output.
@AnythingLinux
AnythingLinux / Convert Images To Webp
Created August 7, 2026 17:31
How To Do Convert Images Webp
#!/usr/bin/env bash
# ============================================================
# Convert the remaining local raster images (logos in
# /assets/images/) to WebP. Run this ON THE SERVER, in the site's
# assets/images directory — the actual image files weren't part of
# this upload, so this couldn't be done automatically here.
#
# After running, update index.html's <img> tags for these files to
# <picture> elements, e.g.:
#
@AnythingLinux
AnythingLinux / How to setup Openrouter API to run free model using Claude Code CLI
Created July 28, 2026 00:35
Setup Openrouter API to run free model using Claude Code CLI to run free model
To set up Claude Code CLI to run completely free models via OpenRouter, you must route the CLI's API requests through OpenRouter's endpoint and pass your OpenRouter API key as the auth token. This approach requires no third-party proxy or Docker containers.
✅ Prerequisites
- Any Linux terminal
- OpenRouter API Key: Get one at openrouter.ai/keys(opens in new tab).
- Claude Code v1.0.30+: Update via npm update -g @anthropic-ai/claude-code or brew upgrade claude-code.
- Node.js 26+.
1. Set Environment Variables (Persistent)
@AnythingLinux
AnythingLinux / How to Download any Website form Claude Platform
Created July 25, 2026 07:50
Download any Website form Claude Platform
Go to platform.claude.com → switch to workspace wrkspc_012A6P52BYVhwVTH (top-left workspace switcher)
Go to Settings → API Keys within that workspace
Create a new key there
Use it:
cd /var/www/html
nano download.py
import anthropic