jimyag

jimyag

V2EX member #561102, joined on 2021-11-08 09:42:25 +08:00
Today's activity rank 26644
jimyag's recent replies
12 days ago
Replied to a topic by tab16360 分享发现 codex 又送一次重置机会 +4 了
```bash
python3 - <<'PY'
import json, urllib.request
from pathlib import Path

auth = json.loads(Path("~/.codex/auth.json").expanduser().read_text())
token = auth["tokens"]["access_token"]
account = auth["tokens"]["account_id"]

req = urllib.request.Request(
"https://chatgpt.com/backend-api/wham/rate-limit-reset-credits",
headers={
"Authorization": f"Bearer {token}",
"ChatGPT-Account-ID": account,
"OpenAI-Beta": "codex-1",
"originator": "Codex Desktop",
},
)

print(urllib.request.urlopen(req).read().decode())
PY
```
May 18
Replied to a topic by wuruxu Linux 分享 tmux 快捷方式
https://github.com/jimyag/dotfiles/blob/33b6a38854ec7694eea85b3bd78ebc7bf3cad7ee/home/dot_profile.d/function#L28-L35

```bash
function tmux_attach_or_new(){
# 无参数时用当前目录名作会话名;$PWD 为 / 时 ${PWD##*/} 为空,需兜底
local name="${1:-${PWD##*/}}"
if [[ -z $name ]]; then
name="root"
fi
tmux new -A -s "$name"
}

function t(){
tmux_attach_or_new "$1"
}
```

可以参考下我这个,在目录中 执行 t 会打开或者创建 目录同名的 session 。

我一般都在 项目目录中 执行 t 或者 t xxx-dev 就好了。
Dec 24, 2025
Replied to a topic by karashoukpan 程序员 大家平时是怎么配置开发机的?
Nov 11, 2024
Replied to a topic by v2byy NAS Nas 上哪个照片管理服务最好用?
immich
Jul 24, 2024
Replied to a topic by linuxsogood 上海 上海天文馆票太难抢
同程上可以买黄牛抢的票,只不过会贵一点
Jun 29, 2024
Replied to a topic by 301 云计算 有无实惠的国内云服务器推荐
Jun 11, 2024
Replied to a topic by keethebest 问与答 求 mac 上 iterm 的平替推荐
kitty
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1154 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 21ms · UTC 18:10 · PVG 02:10 · LAX 11:10 · JFK 14:10
♥ Do have faith in what you're doing.