helm for nginx ingress controller

🧭 Helm to install the NGINX Ingress Controller 🔒 HTTPS termination using a self-signed TLS secret (or you can replace with cert-manager later) 🌐 A sample web service (echo server) 📦 An Ingress resource with host routing and HTTPS 📦 Project Structure (1-file setup) You can copy/paste this into a single script or Helm chart, […] →Read more

build local knowledge base 2

Building a Local Knowledge Base and Agent with LLM Here’s a detailed guide on how to create a local knowledge base from your files and build an agent that can interact with this knowledge. Part 1: Building a Local Knowledge Base Step 1: Set Up Your Environment # Create a virtual environment python -m venv […] →Read more

how to build local knowledge base by LLM 1?

we can build a local knowledge base powered by RAG (Retrieval-Augmented Generation) using: 🔍 ChromaDB (embedded vector DB) 🧠 Ollama (local LLM: Mistral, LLaMA, etc.) ✍️ Go code to ingest documents, embed chunks, and query with context ✅ Prerequisites Install the following tools: # Chroma as a Python backend server pip install chromadb # Ollama […] →Read more

saturation

In software service observability, saturation refers to how "full" or constrained a system or service is in terms of its capacity to handle more work. It is one of the "Four Golden Signals" in the Google SRE book: Latency, Traffic (Usage), Errors, and Saturation To understand saturation beyond Usage (traffic), Errors, and Delay (latency), think […] →Read more

给女儿的一封信

There is no excerpt because this is a protected post.

Managing Services with Snap on Ubuntu

Managing Services with Snap on Ubuntu On Ubuntu, if you want to use snap start commands to run a program as a backend service that automatically restarts when it exits, you’ll need to create and package your application as a Snap with proper service definitions. Creating a Snap with Service Capabilities 1. Create a snapcraft.yaml […] →Read more

Keycloak 的架构与应用

Keycloak 的架构与应用 一、什么是 Keycloak? Keycloak 是一个开源的身份与访问管理(IAM)解决方案,它帮我们搞定登录、单点登录(SSO)、注册、社交登录、MFA、多租户等等——简单说,就是把“怎么登录”的锅交给它,我们专注于写业务代码就行了。 你可以把它想象成“统一认证中心”,你应用里所有关于“用户是谁”“有没有权限”的问题,都可以丢给它来处理。 Keycloak 支持哪些协议? OAuth 2.0:现代认证的主流协议,像 GitHub 登录那套就是它。 OIDC(OpenID Connect):在 OAuth 2.0 上封装一层,用于获取“用户是谁”的信息。 SAML 2.0:主要是企业、老系统在用。 二、Keycloak 架构一图流 +————-+ +——————–+ +————-+ | 浏览器 | <—> | 前端 Vue 应用 | <—> | | +————-+ +——————–+ | | | Keycloak | +————-+ +——————–+ | | | Python | <—> | 后端 FastAPI […] →Read more

what’s “~/.aws/credentials”

AWS credentials 🔍 What is ~/.aws/credentials? This file holds AWS credentials for different user profiles. It’s read by tools like: AWS CLI (aws) AWS SDKs (Python boto3, Java SDK, etc.) Any program using the AWS shared credentials provider Each profile is a named set of AWS credentials (like default, dev-alice, etc.), and contains at minimum: […] →Read more

Chrome Plugin Development – A Beginner’s Guide

Chrome Plugin Development – A Beginner’s Guide I understand you’re new to Chrome plugin (extension) development. Let me walk you through the general framework and steps to create a Chrome extension from scratch. Core Concepts of Chrome Extensions Chrome extensions are built using web technologies: HTML (for UI) CSS (for styling) JavaScript (for functionality) JSON […] →Read more

提示词之新媒体爆款标题

Role – 你是一名资深媒体专家,同时也是一名高级文案专家,你在文案和媒体领域工作了50年,对于怎样的文字可以引起读者的兴趣有着丰富的经验和独到的见解。 – 你的客户是一位自由撰稿人,他擅长撰写各种文稿,例如情感博客、新闻稿、产品测评、产品笔记等,但他不擅长起标题,不知道怎样的标题可以引起读者的兴趣,让他的文稿获得更多读者的阅读。 mandates – 你的任务是分析客户的文稿,然后根据分析结果为客户的文稿提供合适的标题。 – 你提供的标题,需要符合热门标题的风格调性,能够引起读者的兴趣,增加文稿的点击率。 Skills 1.掌握热门标题创作方法 – 提出挑战常识、逆向思维的观点,给读者带来意料之外的认知感官。 – 使用疑问句做标题,通过提出问题引起关注和思考,满足读者求知或求利益的心态。 – 在标题中植入具体数据或数字,通过数字的展示、对比和罗列,勾起读者阅读兴趣。 – 在标题中植入一个待揭晓的悬念,通过悬念诱发读者好奇心,勾起阅读兴趣。 – 提炼文章亮点,高度归纳、概括总结,通过存在逻辑关系的3个短句,组成高信息量、高故事性的标题,引导读者点击标题,阅读内容。 – 使用惊叹号、省略号或其他标点符号增加表达力,营造紧迫感和惊喜感。 – 使用具有强烈情感呼吁和引发好奇心的文字,增加标题的冲击力,吸引读者的注意。 – 使用三段式标题结构,通过分层次的信息展示吸引读者,让读者快速了解文章重点。 2.掌握二极标题创作理念 – 人性本能 本能喜欢:凡事追求最容易做到的和追求马上就能享受到的。 动物驱动:喜欢快乐、愉悦和逃避痛苦、困难。 – 二极原理 正面刺激:利用人们追求容易获得和效果出众的心理,在标题中强调搞价值和容易获取。 负面刺激:利用人们厌恶损失和负面偏误的心理,在标题中强调如果没有获得,会造成巨大损失。 Rules 1.标题必须清晰明确,不包含歧义,不含糊其辞。 2.多使用名词,在任何情况下都不要使用形容词。 3.多使用叙述和说明,在任何情况下都不要使用比喻。 4.不要急着给我答案,let’s take a deep breath and think step by step。 5.Think hard and painstakingly,不要偷懒,不要省略,This […] →Read more