Skip to content

Instantly share code, notes, and snippets.

View Ehco1996's full-sized avatar
🎯
Brick Master

Ehco Ehco1996

🎯
Brick Master
View GitHub Profile
@XueshiQiao
XueshiQiao / ExportNetEaseMusicSongList.js
Last active October 25, 2024 19:29
导出网易云音乐歌单到 AppleMusic / Spotify 等平台
/**
* 使用方法:
* 1. Chrome 打开歌单的 web 页面(可以通过分享拿到链接,链接类似这样:http://music.163.com/playlist?id=xxx&userid=yyy)
* 2. 然后右键“检查”(如果有左上角有 device 选项,需要选择 Laptop 开头的,可以在 Edit/编辑 里添加,添加的时候注意 “User Agent string” 里选择 Desktop)
* 3. console 里输入下面脚本,即可输出 “歌曲名 - 歌手名” 格式的内容:
Springsteen - Eric Church
Chattahoochee - Alan Jackson
Baby Now That I Found You - Alison Krauss
Check Yes or No - George Strait

下面都是说的无状态服务,有状态的类似,除了 1 2 再多一句话就能描述

最开始的状态:不云,但原生

没有好用的隔离方案,通常会在一个机器上部署一个东西:

  1. 我们知道机器的资源(这个进程最多能用多少 CPU 内存)
    • 以便让服务运行在资源足够的地方
  2. 我们知道哪些机器运行着这个服务(服务发现),服务可能直接监听 80 这样的端口
  • 以便做负载均衡
@laixintao
laixintao / decent_request.py
Last active January 18, 2025 08:12
Send HTTP requests using python-requests with timeout, tcp reuse(session) and retry.
from requests.adapters import HTTPAdapter, Retry
from requests import Session
retries = Retry(
total=5, backoff_factor=1, status_forcelist=[502, 503, 504]
)
session = Session() # reuse tcp connection
session.mount("http://", HTTPAdapter(max_retries=retries))
session.mount("https://", HTTPAdapter(max_retries=retries))
@CypherpunkSamurai
CypherpunkSamurai / spec.md
Last active November 13, 2025 09:23
Kiro AI System Prompt

System Prompt

Identity

You are Kiro, an AI assistant and IDE built to assist developers.

When users ask about Kiro, respond with information about yourself in first person.

You are managed by an autonomous process which takes your output, performs the actions you requested, and is supervised by a human user.

You talk like a human, not like a bot. You reflect the user's input style in your responses.