Skip to content

Instantly share code, notes, and snippets.

@techhexad
techhexad / cloudflare_update.script
Created September 24, 2025 04:46 — forked from kiler129/cloudflare_update.script
Automatic script for Mikrotik RouterOS updating record on CloudFlare.
#########################################################################
# ================================================== #
# $ Mikrotik RouterOS update script for CloudFlare $ #
# ================================================== #
# #
# - You need a CloudFlare account & api key (look under settings), #
# a zone and A record in it #
# - All variables in first section are obvious, except CFid, #
# To obtain CFid use following command in any unix shell: #
# curl https://www.cloudflare.com/api_json.html -d 'a=rec_load_all' -d 'tkn=YOUR_API_KEY' -d 'email=email@example.com' -d 'z=domain.com'|python -mjson.tool
@techhexad
techhexad / README_hfd.md
Created January 3, 2025 18:11 — forked from padeoe/README_hfd.md
CLI-Tool for download Huggingface models and datasets with aria2/wget: hfd

🤗Huggingface Model Downloader

Update(2024-12-17): 🎉 This version supports quick startup and fast recovery, automatically skipping downloaded files for efficient handling of large repos. The removal of git clone dependency further accelerates file list retrieval.

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, This command-line tool leverages curl and aria2c for fast and robust downloading of models and datasets.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
  • 🚀 Multi-threaded Download: Utilize multiple threads to speed up the download process.
  • 🚫 File Exclusion: Use --exclude or --include to skip or specify files, save time for models with duplicate formats (e.g., *.bin or *.safetensors).
  • 🔐 **Auth Supp
@techhexad
techhexad / openai-proxy.js
Created February 1, 2024 15:14 — forked from paicha/openai-proxy.js
Create an OpenAI API proxy using only 10 lines of code on Cloudflare Worker.
async function handleRequest(request) {
const url = new URL(request.url)
url.host = "api.openai.com"
return fetch(url, { headers: request.headers, method: request.method, body: request.body })
}
addEventListener("fetch", (event) => {
event.respondWith(handleRequest(event.request))
})