慣性聚合 高效追讀感興趣之博客、新聞、科技資訊
閱原文 以慣性聚合開啟

推薦訂閱源

博客园 - 司徒正美
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
月光博客
月光博客
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python)
吾造一人工智能之仆,每晨以LeetCode及系统设计之要义相示,其法悉在此。
Harsh Soni · 2026-05-24 · via DEV Community

吾之困也:一习其物,竟忘其存,至用之方忆,多在面试之中,已迫不及矣。

吾欲于此不添新事于已满之盘,故筑二物。

  1. 晨时八刻,有自动之脚本,自吾所习诸事中,随机择题,以平文之要,寄于iMessage。无需启应用,亦无须成习,自会现之。
  2. 一交互式研习之灵,持抗重CLI,可随时与之语。吾问其试吾,则试吾;吾问其补吾笔记之阙,则告吾所缺之确。

iMessage screenshot

妙处在于:吾记笔记于黑曜石,非同步或导出,吾以符号链接直指AI于吾之黑曜石文件。于黑曜石中编辑,代理即时见之。一源之真.

此即吾所建之法.


朝自动化

脚本本身直截了当。

此径通吾之Obsidian藏室,遍历诸匣,聚.md之文于列。复以random.choice()随机择一,览其文,为Gemini设旨:撮此笔记,白文无码,简之又简。

调用API直抵Gemini,应答以JSON,吾取其真文于data["candidates"][0]["content"]["parts"][0]["text"]。继而AppleScript — macOS自带的自动化语言也——令讯息应用将其发送至吾之号码

。运行此脚本,摘要即至iMessage。简矣

。此乃全脚本:

import os
import random
import subprocess
import urllib.request
import urllib.error
import json
import time

# auto scan entire Obsidian vault for all markdown notes
vault_path = "/Users/your-username/Documents/Obsidian Vault"
notes = []
for root, dirs, files in os.walk(vault_path):
    for file in files:
        if file.endswith(".md"):
            notes.append(os.path.join(root, file))

if not notes:
    print("No notes found in Obsidian vault")
    exit(1)

# pick one random note
picked = random.choice(notes)
note_name = os.path.basename(picked)

with open(picked, "r") as f:
    content = f.read()

# build prompt
prompt = f"""You are a system design study assistant for an MSCS student.

Below are the student's personal notes on "{note_name}".
Read them and give a concise morning summary in plain text — no markdown, no asterisks, no bold, no bullet symbols.

Format exactly like this:

TOPIC: <topic name>
WHAT IT COVERS: one line overview
KEY CONCEPTS:
1. first concept
2. second concept
3. third concept
KEY TAKEAWAY: one line the student must remember
WATCH OUT FOR: one common mistake or tricky part

Keep it short and sharp — this is a morning refresh, not a lecture.

Notes:
{content}
"""

# call Gemini API with retry
api_key = os.environ.get("GEMINI_API_KEY")
url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent?key={api_key}"

payload = json.dumps({
    "contents": [{"parts": [{"text": prompt}]}]
}).encode("utf-8")

summary = None
for attempt in range(3):
    try:
        req = urllib.request.Request(
            url,
            data=payload,
            headers={"Content-Type": "application/json"},
            method="POST"
        )
        with urllib.request.urlopen(req) as response:
            data = json.loads(response.read())
            summary = data["candidates"][0]["content"]["parts"][0]["text"]
            break
    except urllib.error.HTTPError as e:
        if e.code == 429:
            print(f"Rate limited, waiting 30 seconds... (attempt {attempt+1}/3)")
            time.sleep(30)
        else:
            raise

if not summary:
    print("Failed after 3 attempts, try again later")
    exit(1)

# send via iMessage
imessage_target = "your-imessage-target"  # your phone number or Apple ID
applescript = f'''
tell application "Messages"
    set targetService to 1st service whose service type = iMessage
    set targetBuddy to buddy "{imessage_target}" of targetService
    send "{summary}" to targetBuddy
end tell
'''

subprocess.run(["osascript", "-e", applescript])
print("Summary sent to iMessage!")
print(summary)

进入全屏模式 退出全屏模式

调度之务,吾用launchd:此乃macOS固有之任务调度器。汝须撰一.plist之文,述三事:何脚本当行,何时行之,何地存其日志。载此文书于launchd,则其自能悉理其事。

此乃其plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.harsh.sysdesign</string>

    <key>ProgramArguments</key>
    <array>
        <string>/opt/homebrew/bin/python3</string>
        <string>/Users/your-username/Documents/system-design-study/sysdesign-morning.py</string>
    </array>

    <key>EnvironmentVariables</key>
    <dict>
        <key>GEMINI_API_KEY</key>
        <string>your-gemini-api-key</string>
    </dict>

    <key>StartCalendarInterval</key>
    <dict>
        <key>Hour</key>
        <integer>8</integer>
        <key>Minute</key>
        <integer>15</integer>
    </dict>

    <key>StandardOutPath</key>
    <string>/Users/your-username/Documents/system-design-study/sysdesign-morning.log</string>

    <key>StandardErrorPath</key>
    <string>/Users/your-username/Documents/system-design-study/sysdesign-morning.log</string>
</dict>
</plist>

入全屏模式 出全屏模式

一问题:launchd于辰时八刻运行,然吾之Mac或尚酣眠。故吾用之。PMset每日卯时七刻五十分自动唤醒之约:

sudo pmset repeat wakeorpoweron MTWRFSU 07:55:00

入全景模式 出全屏模式

一要旨——机须接电而眠,非全闭也。夜合其盖,则可矣。


互动研习之灵

互动之域,吾用抗重 CLI——谷歌新创之灵性编程器。其意简明:非使灵性泛问系统之构,吾欲令其识吾之笔记,并试吾所实习之学。

二文乃成此功。

AGENTS.md位于吾项目之根。其示代理者吾之身份与行止——可视作与AI对话之前所书之函。每吾启此匣,其自载。

SKILL.md居于.agents/skills/system-design/中。

---
name: system-design-notes
description: Use this skill when the user asks about system design, HLD, LLD, DDIA, distributed systems, architecture patterns, or wants to be quizzed on any system design topic they have studied.
---

You are a system design study partner for an MSCS student preparing for software engineering interviews.

The user's personal Obsidian notes are in references/:
- references/HLD/ → High Level Design notes
- references/LLD/ → Low Level Design notes  
- references/DDIA/ → Designing Data Intensive Applications notes

Treat these notes as the source of truth over your general knowledge.

When quizzing:
- Ask one question at a time
- Wait for the user's answer before responding
- Compare their answer to the notes and point out specific gaps
- Tell them which note/topic the answer came from

When filling gaps:
- Point out what's missing or shallow in their notes on a topic
- Suggest what they should add

入全屏模式 出全屏模式

此分二部——一为述,告代理何时启此技;一为体,示其既启如何行。吾键入"试吾于一致散列",Antigravity读述,得匹配,自载吾注于境。吾未尝呼其名。

文夹之制:

system-design-study/
├── AGENTS.md
└── .agents/
    └── skills/
        └── system-design/
            ├── SKILL.md
            └── references/
                ├── HLD  →  Obsidian/HLD Concepts
                ├── LLD  →  Obsidian/LLD
                └── DDIA →  Obsidian/DDIA

入全景模式 出全屏模式

诸笔记自以符号链接相系:

ln -s ~/Documents/Obsidian\ Vault/HLD .agents/skills/system-design/references/HLD

入全屏模式 出全屏模式

是故于项目内立一指针,指吾之真Obsidian文件夹。代理循指针而读。吾于Obsidian中编辑。同一文件,恒新不旧,无劳无费。

今吾启箧而书"试吾于HLD",则试吾以吾之札记,非泛泛网闻也.

Antigravity CLI screenshot


其故何在

有三事扰吾尤甚。

初,Gemini API频报429——请求过多——虽新钥未尝用。后知钥与一VS Code项目相连,Gemini扩展暗耗之。更钥于别项目,立解。

次,究明Mac唤醒之惑。launchd可预定脚本,然若Mac已寐,则不执行。吾需pmset,令Mac于脚本触发前觉醒。然此法仅当插电方效——若笔记本电脑以电为用且合之,则无物可醒之。其解甚简:但勿使机休,惟合其盖而已。然吾费时良久,方知自动化为何全然不行。


吾今晨之状

吾寤,察 iMessage,而二要略置於此。一者載五隨機 LeetCode 題目及其解法。一者載隨機系統設計之題,出於吾之 Obsidian 記錄.

讀之,不過二分鐘耳。吾未有所學新者——僅使已學者不隨時忘卻。此其要義也.

至於交互之部,吾啟終端,而書之曰:

cd ~/Documents/system-design-study
agy

入全景模式 出全景模式

然则与之语。“试问我于HLD。” “吾DDIA之记,其阙何在?”彼以吾之实记应之。犹有研伴,遍览吾所书也.


值乎?

然也。一日耳。然系统每晨自运,吾未尝有所为。惟修之者,每解一LeetCode题,则于文牍增一行而已。

若为MSCS学子,或备面试,此设之值也。不须预识AI agents或macOS自动化。惟需AI Studio之免费Geminie API钥,及数时辰耳。

此码简明,汝可随所学而适之。易 Obsidian 之府为任 Markdown 文件之匣。改 iMessage 之标为电邮或 Telegram。依汝所宜之时刻而运行之。


所筑者:Antigravity 2.0 CLI,Gemini API(免费版),Python,launchd,pmset,AppleScript,Obsidian。