Skip to content

Commit ac8ecc1

Browse files
committed
Add study notes for 2025-08-18
1 parent cf929d7 commit ac8ecc1

1 file changed

Lines changed: 173 additions & 0 deletions

File tree

cmu-ruoyan-lgl.md

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,179 @@ web2游戏大厂工作两年
1515
## Notes
1616

1717
<!-- Content_START -->
18+
# 2025-08-18
19+
20+
整理开发快捷键
21+
## Cursor
22+
23+
### 终端
24+
25+
在/Users/ruoyan/Library/Application Support/Cursor/User/keybindings.json中修改快捷键
26+
#### 创建一个新的cusor内置终端并聚焦
27+
```json
28+
{
29+
"key": "ctrl+cmd+n",
30+
"command": "workbench.action.terminal.new"
31+
}
32+
```
33+
34+
#### 聚焦到cursor内置终端
35+
```json
36+
{
37+
"key": "alt+w",
38+
"command": "workbench.action.terminal.focus"
39+
}
40+
```
41+
42+
#### 在cursor内置的终端之间切换
43+
```json
44+
{
45+
"key": "alt+q",
46+
"command": "workbench.action.terminal.focusNext"
47+
}
48+
```
49+
50+
#### 关闭当前cursor内置的终端
51+
```json
52+
{
53+
"key": "alt+r",
54+
"command": "workbench.action.terminal.kill"
55+
}
56+
```
57+
58+
### AI CHAT
59+
60+
#### 打开ai chat页面,同时引用选定当前内容,如果已经打开则隐藏ai chat页面
61+
```json
62+
{
63+
"key": "cmd+l",
64+
"command": "aichat.newchataction"
65+
}
66+
```
67+
68+
### PAGE
69+
70+
#### 在打开的页面(标签)中切换
71+
```json
72+
{
73+
"key": "ctrl+tab",
74+
"command": "workbench.action.quickOpenNavigateNextInEditorPicker",
75+
"when": "inEditorsPicker && inQuickOpen"
76+
}
77+
```
78+
79+
#### 聚焦到当前页面(标签)
80+
```json
81+
{
82+
"key": "alt+e",
83+
"command": "workbench.action.focusActiveEditorGroup",
84+
"when": "terminalFocus || panelFocus || sideBarFocus"
85+
}
86+
```
87+
88+
#### 关闭当前页面(标签)
89+
```json
90+
{
91+
"key": "alt+x",
92+
"command": "workbench.action.closeActiveEditor",
93+
"when": "editorIsOpen"
94+
}
95+
```
96+
97+
#### 打开上一个页面(标签)
98+
```json
99+
{
100+
"key": "alt+cmd+left",
101+
"command": "workbench.action.nextEditor"
102+
}
103+
```
104+
105+
#### 打开下一个页面(标签)
106+
```json
107+
{
108+
"key": "alt+cmd+right",
109+
"command": "workbench.action.nextEditor"
110+
}
111+
```
112+
113+
#### 将焦点置于主侧栏
114+
```json
115+
{
116+
"key": "cmd+0",
117+
"command": "workbench.action.focusSideBar"
118+
}
119+
```
120+
121+
#### 查看: 聚焦到面板中
122+
```json
123+
{
124+
"key": "alt+t",
125+
"command": "workbench.action.focusPanel"
126+
}
127+
```
128+
129+
130+
## foundry
131+
132+
133+
### forge
134+
135+
**典型工作流**
136+
```bash
137+
forge init my_project # 初始化项目
138+
forge build # 编译合约
139+
forge test # 运行测试(支持模糊测试)
140+
forge test --mt ${函数名称} -vvvvv # 测试指定测试合约中过的函数
141+
forge script Deploy # 部署脚本执行
142+
forge fmt # 代码格式化
143+
forge install OpenZeppelin/openzeppelin-contracts
144+
forge selectors find "balanceOf(address)" # 0x70a08231
145+
```
146+
147+
### cast
148+
149+
**常用场景**
150+
```bash
151+
cast send <合约> "函数" 参数 # 发送交易
152+
cast call <合约> "视图函数" # 查询状态
153+
cast block latest # 获取最新区块
154+
cast --to-base 0x1 hex # 数据格式转换
155+
cast sig "transfer(address)" # 计算函数选择器
156+
```
157+
158+
### anvil
159+
160+
```bash
161+
anvil # 本地虚拟网络
162+
```
163+
164+
### make
165+
166+
生成如下makefile
167+
```bash
168+
include .env
169+
170+
deploy_ruoyancoin:
171+
@echo "deploying contract..."
172+
forge create src/ruoyancoin.sol:ruoyancoin --private-key ${OWNER_PRIVAYE_KEY} --broadcast --constructor-args ${OWNER_ADDRESS}
173+
174+
mint:
175+
@echo "Minting tokens..."
176+
cast send ${CONTRCT_ADDRESS} "mint(uint256)" ${MINT_AMOUNT} --private-key ${OWNER_PRIVATE_KEY}
177+
178+
```
179+
180+
181+
## react
182+
183+
184+
185+
## next.js 15
186+
187+
## wagmi (建议用这个构建web3前端,底层是ether.js)
188+
189+
## rainbowkit
190+
18191
# 2025-08-17
19192

20193
今天大概是这周最忙的一天,感受颇深,上午起来就开始忙黑客松的事,过程中越发感觉一个团队必须有真正的纪律流程体系才能做到井井有条,不然可能只是瞎忙,而且没有效率,结果也不会好。想起我工作的第一家公司,公司入职培训的第一课就是“高效能人士的7个习惯”,而第二家公司的主管一直强调“要成为一个可靠的人”,还好我一直把这个要求自己。今天又回顾了下实习手册,bruce老师说的:“靠谱”的实习生应该有“可预期、可沟通、可复盘”的特性,确实是在团队协作中不可缺少的部分,之后也要一直要求自己。

0 commit comments

Comments
 (0)