[self review:2022];
C
- H 项目延期导致亏损,直接影响就是团队裁员
- 项目中间进行变更,痛苦的过程最后有点无厘头的结束,结论:不是所有人都认真关注你关注的,大差不差即可,时间会帮助你
- 和聪明但流程贪婪的人做生意,结果就是被吃干抹净
- 全年收获:团队,认可
Git Worktree Notes
git worktree
,不切换 git 分支,又在多个分支同时工作。
git worktree list
list all worktreegit worktree add [-b <new-branch>] <path> [<commit-ish>]
create a worktree at path and checkout commit-ish into itgit worktree remove <worktree>
remove the special worktreegit worktree prune
prune dirty infos
在功能开发 feature/x
过程中,突发紧急问题修复,通常可以通过 git stash
来临时保存当前修改,但这种方式容易造成混乱,推荐使用 git worktree
,更为清晰:
# 从 master 分支创建一个临时工作区用于 hotfix
$ git worktree add -b emergency-fix ../temp master
$ pushd ../temp
# ... hack hack hack ...
$ git commit -a -m 'emergency fix for boss'
$ popd
$ git worktree remove ../temp
AI Vibe Coding 场景,可以通过 worktree 创建多个不同工作区,使用 Claude Code/Gemini CLI/OpenAI Codex/AMP 等多个工具进行,或者自己在主工作区进行 tasks 安排,创建 A 工作区做 task1,B 工作区做 task2。
Not allowed to navigate top frame to data URL
function base64ToArrayBuffer(_base64Str) {
var binaryString = window.atob(_base64Str);
var binaryLen = binaryString.length;
var bytes = new Uint8Array(binaryLen);
for (var i = 0; i < binaryLen; i++) {
var ascii = binaryString.charCodeAt(i);
bytes[i] = ascii;
}
return bytes;
}
function showDocument(_base64Str, _contentType) {
var byte = base64ToArrayBuffer(_base64Str);
var blob = new Blob([byte], {type: _contentType});
document.location.replace(URL.createObjectURL(blob));
}
showDocument('PGh0bWw+Cgo8Ym9keT4KICBoZWxsbyB3b3JsZC4KPC9ib2R5PgoKPC9odG1sPgo=', 'text/html');
- https://itechowl.wordpress.com/2020/01/27/javascript-not-allowed-to-navigate-top-frame-to-data-url-chrome/
Opinion on Lua
power but poor, very host limited
SSH config in macOS Ventura
macOS Ventura changed SSH algorithm, you need to update your SSH config file ~/.ssh/config
to make it work.
Host *
UseKeychain yes
IdentitiesOnly yes
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
10th
2012.09.29 -> 2022.09.29, I LOVE Linn
Single Quote Prefix in Google Spreadsheet
When adding/updating cells in Google Spreadsheet, a single quote ('
) was prefixed to the value.
‘2022-05-01
This can be fixed by changing the valueInputOption
to USER_ENTERED
. There’re two options:
RAW
: The values the user has entered will not be parsed and will be stored as-is.USER_ENTERED
: The values will be parsed as if the user typed them into the UI. Numbers will stay as numbers, but strings may be converted to numbers, dates, etc.
If you’re using https://github.com/burnash/gspread, change the value_input_option
.
Untitled
If this is the worst thing that happened to you in your life, you got a very lucky, blessed and fortunate life.
– Spurs Gregg Popovich
codesign an unsigned library
Some Python modules are not signed, will raise ImportError on M1 macOS:
ImportError: dlopen(/tmp/test/.venv/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so, 2): no suitable image found. Did find:
/tmp/test/.venv/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so: code signature in (/tmp/test/.venv/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so) not valid for use in process using Library Validation: Trying to load an unsigned library
You can use xcrun codesign
to sign the library so: xcrun codesign -s - <path>
. Here is:
xcrun codesign --sign - /tmp/test/.venv/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so