Hero Image
Til

Checklist Design Tuxedo No.2 - A Cocktail Companion MangaMillion debloat.dev — replace the junk 台灣罪犯圖鑑 直轄市及各縣市短期補習班資訊管理系統 各運動種類不適任教練名單 — 案源比對工作表 運動部 - 涉及違法事件不適任教練資訊專區 運動部 - 教練證照查詢系統 CRC 聯合國兒童權利公約資訊網 - 違反兒少法 衛生福利部 - 醫事人員性別事件資訊專區 全國教保資訊網 - 裁罰紀錄查詢 Article We replaced Redis with MySQL for inventory reservations—and it scaled How we tracked down a 16-year-old SQLite bug Database cr-sqlite - Convergent, Replicated, SQLite Dbmate is a database migration tool that will keep your database schema in sync across multiple developers and your production servers. Diagram Turn a codebase or system description into a polished, interactive system map — directly in chat. Editorial diagrams your designer won’t hate. Github Gemma 4 26B-A4B inference in ~2 GB of RAM on any M-series MacBook claude-tap is a local proxy and trace viewer for AI coding agents. Bark is an iOS App which allows you to push custom notifications to your iPhone macOS menu bar app that tells you, in plain English, what each USB-C cable plugged into your Mac can actually do Rebuild the object in a reference image as a code-only, procedural Three.js model. MALWARE RESEARCH HUB Pumpkin is a Minecraft server built entirely in Rust, offering a fast, efficient, and customizable experience. Lody: A shared workspace for the coding agents your team already uses. Boot a virtual iPhone via Apple’s Virtualization.framework using PCC research VM infrastructure. The largest Open-Source UI Library! Community-made and free to use. Made with either CSS or Tailwind. Data intensive science for everyone. MCP fff: A file search toolkit for humans and AI agents. Pre-indexed code knowledge graph, auto syncs on code changes. Present PPT Master — AI generates native PowerPoint from any document Bento — the office suite that fits in a file The slide framework built for agents. Self-Hosted CertMate - Certificate Lifecycle Management Skill Skills for Designers and Engineers. Test Generator Agent Skills for Real Engineers. Straight from my .agents directory. Autonomous game development for Godot, Bevy, and Babylon.js with Claude Code and Codex Taste-Skill - gives your AI good taste. stops the AI from generating boring, generic slop Comprehensive production pipeline for quad-modal AI filmmaking with Seedance 2.0 skill to create best prompts for generating videos with seedance2.0

Hero Image
OpenResty + Redis: Block High-Frequency IPs

OpenResty + Redis: Block High-Frequency IPs init_by_lua_block { redis = require "redis" client = redis.connect('127.0.0.1', 6379) } server { listen 8080; location / { access_by_lua_file /usr/local/nginx/conf/lua/block.lua; proxy_pass http://192.168.1.102:8000; } } -- Redis-based IP rate limiting / blocking for OpenResty (ngx_lua) -- NOTE: -- This script assumes a global `client` variable is used/stored. -- Make sure `redis` module is available and `client` is initialized somewhere. local function isConnected() return client:ping() end local function createRedisConnection() return redis.connect("127.0.0.1", 6379) end -- If the Redis connection fails, stop blocking (allow traffic) if pcall(isConnected) then -- already connected (or ping succeeded) else -- not connected; try reconnect if pcall(createRedisConnection) then -- Reconnect: this will reconnect Redis on every request -- For high traffic, consider disabling reconnect (skip pcall), and allow/terminate directly via ngx.exit client = createRedisConnection() else ngx.exit(ngx.OK) end end local ttl = 60 -- sampling window (seconds) local bktimes = 30 -- requests within window to trigger block local block_ttl = 600 -- block duration after trigger (seconds) local ip = ngx.var.remote_addr local ipvtimes = client:get(ip) if ipvtimes then if ipvtimes == "-1" then -- blocked return ngx.exit(403) else local last_ttl = client:ttl(ip) -- ngx.say("key exist.ttl is ", last_ttl) if last_ttl == -1 then client:set(ip, 0) client:expire(ip, ttl) -- ngx.say("ttl & vtimes recount") return ngx.exit(ngx.OK) end local vtimes = tonumber(client:get(ip)) + 1 if vtimes < bktimes then client:set(ip, vtimes) client:expire(ip, last_ttl) -- ngx.say(ip, " view ", vtimes, " times") return ngx.exit(ngx.OK) else -- ngx.say(ip, " will be block next time.") client:set(ip, -1) client:expire(ip, block_ttl) return ngx.exit(ngx.OK) end end else -- key does not exist client:set(ip, 1) -- ngx.say(ip, " view 1 times") client:expire(ip, ttl) return ngx.exit(ngx.OK) end