Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lmj01 committed Jun 17, 2024
1 parent 9b5d700 commit 997e137
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 60 deletions.
9 changes: 9 additions & 0 deletions articles/2024/trend.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# 趋势

## ui headless

去年github上增长最快的一个库,是[shadcn/ui组件库](https://ui.shadcn.com/)

无头系统(Headless System)是指已配置为无须显示器(即“头”)、键盘和鼠标操作的计算机系统或设备。无头系统通常通过网络连接控制,但也有部分无头系统的设备需要通过RS-232串行连接进行设备的管理。服务器通常采用无头模式以降低运作成本。

[Headless UI 全称是 Headless User Interface](https://www.merrickchristensen.com/articles/headless-user-interface-components/),是一种前端开发的方法论(亦或者是一种设计模式),其核心思想是将 用户界面(UI)的逻辑和交互行为 与 视觉表现(CSS 样式) 分离开来;具体而言,Headless UI 的组件通常是纯粹的 JavaScript(或其他编程语言)组件,它们包含了一些交互逻辑和状态管理,但没有任何与视觉样式相关的代码。


## AI

美国作家Clifford Stoll的一句话,曾很好地概括了这一点,也可以回应你的这个问题,他曾说过:“数据不是知识。知识不是智慧。智慧不一定是聪明”。
Expand Down
2 changes: 2 additions & 0 deletions dev-note/cmake.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# CMake

- [CMake FAQ](https://gitlab.kitware.com/cmake/community/-/wikis/FAQ)

## 详解

- 目标Target
Expand Down
112 changes: 52 additions & 60 deletions dev-note/git.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Git

[官方文档](https://git-scm.com/docs)
[中文官方文档](https://git-scm.com/book/zh/v2)
[A successful Git branching model](https://nvie.com/posts/a-successful-git-branching-model/)
- [官方文档](https://git-scm.com/docs)
- [中文官方文档](https://git-scm.com/book/zh/v2)
- [A successful Git branching model](https://nvie.com/posts/a-successful-git-branching-model/)
- 未读完

## 概念
- 补丁,即git diff生成的内容
- commit,提交内容
Expand All @@ -16,7 +17,8 @@
- git remote add repo-name repo-url 添加远程仓库地址
- git remote rm repo-name 删除远程仓库关联
- git push origin branch-name 把当前分支推送到origin
- git clone <repository> --recursive递归克隆整个项目
- git clone <repository>
- git clone --recurse-submodules repo-url 自动初始化并更新每个子模块,包括嵌套的子模块

### 推送
推送本地local_branch到远程remote_branch并建立关联关系
Expand All @@ -25,13 +27,21 @@
- git push origin local_branch:remote_branch 远程remote_branch不存在
- git pull origin main --allow-unrelated-histories //历史记录不一样

### submodule
### [submodule](https://git-scm.com/docs/git-submodule)
- git submodule add <repository> <path>添加子模块 path是相对根目录的路径
- git submodule add -b branch_name URL_to_Git_repo optional_directory_rename
- git submodule init初始化子模块
- git submodule update更新子模块 // 切换分支后就需要执行它
- git submodule update --init
- git submodule update --init --recursive
- git submodule foreach git pull拉取所有的子模块
- git submodule sync
- git submodule sync --recursive
- git config -f .gitmodules submodule.DbConnector.branch branchName 设置或更新某个分支

删除

- git submodule deinit mod_name
- git rm --cached mod_name

### branch
分支
Expand Down Expand Up @@ -65,58 +75,53 @@
### git checkout

- git checkout --orphan branchName // 创建空的分支

- git checkout -b <new-branch-name> [<existing-branch>]
基于存在的分支创建,未指定即当前分支
相当于执行git branch 和git checkout 命令组合

- git checkout -b feature-branch origin/feature-branch
创建并切换到远程分支
- git checkout -b <new-branch-name> [<existing-branch>] 基于存在的分支创建,未指定即当前分支,相当于执行git branch 和git checkout 命令组合
- git checkout -b feature-branch origin/feature-branch 创建并切换到远程分支

## 配置

### config
git的配置
```shell
git config --global user.name "lmj01"
git config --global user.email "[email protected]"
git config --global color.ui auto 增强命令输出的可读性
git config --global init.defaultBranch main // 更改默认分支git2.28支持
git config --local user.name
### 配置稀疏文件
git config core.sparsecheckout true
echo "absolute-path" >> .git/info/sparse-checktout
git pull --depth=1 origin master
```
### gitignore

### git ssh
在Linux中执行
ssh-keygen -t rsa -C "[email protected]"
执行后,直接回车三次
1. /mtk/ 过滤整个文件夹
2. *.zip 过滤所有.zip文件
3. /mtk/do.c 过滤指定文件
4. !/mtk/one.txt 添加指定文件

### git ssh
- 在Linux中执行ssh-keygen -t rsa -C "[email protected]"执行后,直接回车三次
- 第一次是要输入路径,否则默认数据
- 第二次是passphrase
- 第三次确认passphrase

得到一个id_rsa和id_rsa.pub两个密钥,一个私钥,一个公钥

ssh -v [email protected] // 这句会与服务器进行连接,看看客户端是否显示内容
ssh-agent -s

known_hosts
~/.ssh/known_hosts文件中存在git的public key
- ssh -v [email protected] // 这句会与服务器进行连接,看看客户端是否显示内容
- ssh-agent -s

### 凭证缓存
因为gitlab的密码输出错误,导致权限HTTP Basic: Access Denied错误
执行清楚权限帮助
git config --system --unset credential.helper
缓存
git config credential.helper cache
无限期保存
git config credential.helper store
[官方文档](https://git-scm.com/docs/git-credential-store)
- known_hosts 在~/.ssh/known_hosts文件中存在git的public key

### [凭证缓存](https://git-scm.com/docs/git-credential-store)
因为gitlab的密码输出错误,导致权限HTTP Basic: Access Denied错误, 执行清楚权限帮助
- git config --system --unset credential.helper
- git config credential.helper cache 缓存
- git config credential.helper store 无限期保存

### 合并策略配置
[Git Attributes](https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes)
合并分支指定文件忽略掉
git config merge.ours.driver true
- git config merge.ours.driver true

在根目录下添加文件.gitattributes
文件中每一行就是对文件的属性进行处理
Expand All @@ -125,19 +130,6 @@ pox.xml merge=ours
*.xml merge=ours
```

### 配置稀疏文件

- git config core.sparsecheckout true
- echo "absolute-path" >> .git/info/sparse-checktout
- git pull --depth=1 origin master

### gitignore

1. /mtk/ 过滤整个文件夹
2. *.zip 过滤所有.zip文件
3. /mtk/do.c 过滤指定文件
4. !/mtk/one.txt 添加指定文件

## 回滚

```shell
Expand Down Expand Up @@ -175,20 +167,20 @@ git reset --soft HEAD~2 撤销多个提交
- git checkout -p(--patch) origin/A filename.ext 把A(本地或远程)分支的某个文件合并到现在分支。

存在差异时有如下的缩写字母命令
y - apply this hunk to index and worktree # 应用当前hook,把A分支的东西应用到当前分支
n - do not apply this hunk to index and worktree # 放弃当前hook,放弃A分支的,用当前分支的。
q - quit; do not apply this hunk or any of the remaining ones # 不使用任何hook,直接退出
a - apply this hunk and all later hunks in the file # 在当前文件下应用此hook以及后续的所有hook
d - do not apply this hunk or any of the later hunks in the file # 在当前文件下不应用此hook以及后续的所有hook
g - select a hunk to go to # 选择一个hook
/ - search for a hunk matching the given regex # 使用正则搜索hook
j - leave this hunk undecided, see next undecided hunk # 先跳过当前hook,并跳转到下一个未处理hook
J - leave this hunk undecided, see next hunk # 先跳过当前hook,并跳转到下一个hook
k - leave this hunk undecided, see previous undecided hunk # 先跳过当前hook,并跳转到上一个未处理hook
K - leave this hunk undecided, see previous hunk # 先跳过当前hook,并跳转到上一个hook
s - split the current hunk into smaller hunks # 切割当前hook
e - manually edit the current hunk # 编辑当前hook
? - print help # 显示帮助信息
- y - apply this hunk to index and worktree # 应用当前hook,把A分支的东西应用到当前分支
- n - do not apply this hunk to index and worktree # 放弃当前hook,放弃A分支的,用当前分支的。
- q - quit; do not apply this hunk or any of the remaining ones # 不使用任何hook,直接退出
- a - apply this hunk and all later hunks in the file # 在当前文件下应用此hook以及后续的所有hook
- d - do not apply this hunk or any of the later hunks in the file # 在当前文件下不应用此hook以及后续的所有hook
- g - select a hunk to go to # 选择一个hook
- / - search for a hunk matching the given regex # 使用正则搜索hook
- j - leave this hunk undecided, see next undecided hunk # 先跳过当前hook,并跳转到下一个未处理hook
- J - leave this hunk undecided, see next hunk # 先跳过当前hook,并跳转到下一个hook
- k - leave this hunk undecided, see previous undecided hunk # 先跳过当前hook,并跳转到上一个未处理hook
- K - leave this hunk undecided, see previous hunk # 先跳过当前hook,并跳转到上一个hook
- s - split the current hunk into smaller hunks # 切割当前hook
- e - manually edit the current hunk # 编辑当前hook
- ? - print help # 显示帮助信息

### 迁移
cherry-pick对子目录不太友好,会改变目录结构,迁移时更多选择
Expand Down
13 changes: 13 additions & 0 deletions dev-note/maven.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@
- mvn install
- mvn clean install -Dmaven.test.skip=true

### springboot
- mvn spring-boot:run

## 配置

### config/setting.xml
设置私有库,需要更改三处地方
```xml
<localRepository>E://repoJava</localRepository>
<server></server>
<mirror></mirror>
```

## itext7

itext7 的字体涉及到版权问题,基本就是与adobe有关
Expand Down
3 changes: 3 additions & 0 deletions web/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Web

- [网页平台最好的开发集合地A place to find the best open source projects related to the web platform](https://bestofjs.org/)
- [增长最快的排行榜](https://risingstars.js.org/2023/en)

- [使用过的库](/web/library.md)
- [正则表达式](/cpl/js/regularExpressions.js)
- [webassembly](/web/webAssembly.md)
Expand Down

0 comments on commit 997e137

Please sign in to comment.