Skip to content

Commit

Permalink
fix: Retrive links from Notion content
Browse files Browse the repository at this point in the history
  • Loading branch information
RiverTwilight committed Mar 8, 2024
1 parent bd95bb2 commit 13247fc
Show file tree
Hide file tree
Showing 21 changed files with 148 additions and 139 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"dev": "next",
"build": "next build",
"start": "next start -p 4000",
"test:notion": "node ./src/utils/notion.js",
"install:theme": ""
"test:notion": "node ./src/utils/notion.js"
},
"author": "",
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions posts/en-US/Coding/setup-new-ubuntu-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ cat /root/.ssh/id_ed25519.pub
vim /root/.ssh/id_ed25519.pub
```

Add this key to your GitHub account under SSH keys settings.
Add this key to your GitHub account under [SSH keys settings](https://github.com/settings/keys).

## Install PM2

Expand All @@ -122,7 +122,7 @@ Replace “yarn” and second “start” with your actuall command.

## Config Nginx & SSL

⚠️ Note: Replace 'ygeeker.com.cn' with your domain.
⚠️ Note: Replace '[ygeeker.com.cn](http://ygeeker.com.cn/)' with your domain.

Create the Nginx configuration file:

Expand Down Expand Up @@ -179,7 +179,7 @@ sudo certbot --nginx -d <your_domain> # Generate Certificate

Ensure DNS settings are correctly configured to point to your server.

For more on Certbot, visit this page.
For more on Certbot, visit this [page](https://certbot.eff.org/instructions?ws=nginx&os=ubuntufocal).

## Use Github action for automention

Expand Down
10 changes: 5 additions & 5 deletions posts/en-US/Tech/best-practice-of-figma-for-indie-hackers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ summary: If you're an indie like me, in this post, I'll share how I manage my te


As an indie hacker, you don't need to use Figma like a large organization. Typically, if you're an indie hacker, you may:
- Have several websites for landing or documentation, or an all-in-one like YGeeker created by me
- Have several websites for landing or documentation, or an all-in-one like [YGeeker](https://www.ygeeker.com/) created by me
- Have several apps. Some on iOS only, some on multiple platforms, some extensions, etc.
- Work solo most of the time. But sometimes your fans or enthusiasts help you with an icon, a page, etc.

Expand All @@ -22,7 +22,7 @@ Typically we put each screen in a Frame.

It’s not recommended to put all frames in one page. Instead, use new page for a new screen. The space in the editor allows you try different ideas. Good design needs tries, tries, and retries. Besides, if a page is for a component (such as buttons), you may need to create variants for that, so it’s always a good idea to leave more space. Trust me, you won’t like navigating by dragging your pointer and find the frame in a mess.

Here’s the Newsroom page (a single page in Figma) created by my colleague for the Newsroom page of YGeeker. A perfect example:
Here’s the Newsroom page (a single page in Figma) created by my colleague for the [Newsroom](https://www.ygeeker.com/newsroom) page of YGeeker. A perfect example:

![Image](/image/post/c132802b-8ae8-4e52-ac0a-4abebdb35560_Screenshot_2024-03-07_at_17.27.31.png)

Expand Down Expand Up @@ -79,11 +79,11 @@ Therefore, it's practical to make a component for each logo/icon.
- Create component for each product icon

## Read More
- https://www.figma.com/best-practices/team-file-organization
- https://help.figma.com/hc/en-us/sections/4403935997847-Components
- [https://www.figma.com/best-practices/team-file-organization](https://www.figma.com/best-practices/team-file-organization/#by-pillars)
- [https://help.figma.com/hc/en-us/sections/4403935997847-Components](https://help.figma.com/hc/en-us/sections/4403935997847-Components)



💡 Feel free to comment via GitHub issue page or drop me an email.
💡 Feel free to comment via GitHub [issue](https://github.com/RiverTwilight/rene.wang/issues) page or drop me an email.


2 changes: 1 addition & 1 deletion posts/zh-CN/Coding/develop-an-assistant-one.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ assistant.regsiter("./components/core/swpu/is.js", {

国内开放 API 的 IM 平台还比较少,后续将接入国外的一些平台。值得一提的是,配置结构可能就要采取”订阅源“和”用户“分开存储的逻辑。

项目地址: **github.com/rivertwilight/assistant**
项目地址: **[github.com/rivertwilight/assistant](http://github.com/rivertwilight/assistant)**
10 changes: 5 additions & 5 deletions posts/zh-CN/Coding/get-gradinent-with-backpropagation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ $$
F(x) = F_{2}(F_{1}(x))
$$

我们带入神经网络的知识来理解。这个式子相当于使用了两个Affine函数并且使用线性激活层(可以暂时理解为忽略该层梯度存在)。我们的目标是求w_{1}的梯度。根据高等数学的链式法则有:
我们带入神经网络的知识来理解。这个式子相当于使用了两个Affine函数并且使用线性激活层(可以暂时理解为忽略该层梯度存在)。我们的目标是求$$ w_{1} $$的梯度。根据高等数学的链式法则有:

$$
\frac{∂y}{w_{1}} = \frac{y}{∂F_{1}} \frac{∂F_{1}}{w_{1}}
$$

容易解出梯度为w_{2}x。
容易解出梯度为$$ w_{2}x $$

一般的计算梯度方法为微分法,即:

Expand Down Expand Up @@ -100,7 +100,7 @@ class Affine:
return dx
```

那么如何使用反向传播来计算呢?可以这么理解:我们先计算E关于x的梯度,然后反向传播给F_{2},随即计算出损失值关于w_{2}的梯度。在上面的方法中,通常我们是从左往右计算,而反向传播就是从右往左计算。
那么如何使用反向传播来计算呢?可以这么理解:我们先计算$$ E $$关于x的梯度,然后反向传播给$$ F_{2} $$,随即计算出损失值关于$$ w_{2} $$的梯度。在上面的方法中,通常我们是从左往右计算,而反向传播就是从右往左计算。

我们通过一个更贴近实际的例子来加深理解。

Expand All @@ -110,13 +110,13 @@ $$
E = \frac{(y - t)^2}{2}
$$

为损失函数,其中t代表教师标签,y代表隐藏层输出。根据链式法则,w_{1}梯度为:
为损失函数,其中$$ t $$代表教师标签,y代表隐藏层输出。根据链式法则,$$ w_{1} $$梯度为:

$$
\frac{∂E}{∂w_{1}} = \frac{∂E}{∂y} * \frac{∂y}{∂F_{1}}*\frac{∂F_{1}}{∂w_{1}}
$$

在反向传播中,我们首先计算出输出层(E)的导数,然后反向传播给上一层(F_{2})。于是我们可以先得到w_{2}关于E的梯度为
在反向传播中,我们首先计算出输出层($$ E $$)的导数,然后反向传播给上一层($$ F_{2} $$)。于是我们可以先得到$$ w_{2} $$关于E的梯度为

$$
\frac{∂E}{∂w_{2}} = \frac{∂E}{∂y} * x_{2}
Expand Down
2 changes: 1 addition & 1 deletion posts/zh-CN/Coding/hvv-experience.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ summary: 最近连续参加了几家 hvv 面试,现总结如下。包括中介
- 问:corntab 的计划任务列表存储在哪里?
- 答:位于 /etc/corntab 目录。
- 问:能说说 corn 的详细语法吗?
- 答:参考 https://blog.csdn.net/chen__yang_/article/details/109523061。创建、编辑计划任务的命令为crontab -e,查看当前计划任务的命令为crontab -l,删除某条计划任务的命令为crontab -r。
- 答:参考 [https://blog.csdn.net/chen__yang_/article/details/109523061](https://blog.csdn.net/chen__yang_/article/details/109523061#:~:text=cron%E8%AE%A1%E5%88%92%E4%BB%BB%E5%8A%A1%E8%AF%A6%E8%A7%A3%201%20%E8%AE%A1%E5%88%92%E4%BB%BB%E5%8A%A1%E7%AE%80%E4%BB%8B%20%2A%2A%2A%2A%2A%2A%2A%2A%E7%AE%80%E5%8D%95%E7%9A%84%E9%9C%80%E6%B1%82%2A%2A%2A%2A%2A%2A%2A%2A%201%20...%202%20cron%E5%9F%BA%E7%A1%80,1%20...%204%20%E7%94%A8%E6%88%B7%E7%BA%A7%E7%9A%84%E8%AE%A1%E5%88%92%E4%BB%BB%E5%8A%A1%20crontab%E5%B8%B8%E7%94%A8%E5%8F%82%E6%95%B0%20-u%20%E9%99%84%E5%8A%A0%E8%A6%81%E4%BF%AE%E6%94%B9%E5%85%B6crontab%E7%9A%84%E7%94%A8%E6%88%B7%E7%9A%84%E5%90%8D%E7%A7%B0%E3%80%82%20)。创建、编辑计划任务的命令为crontab -e,查看当前计划任务的命令为crontab -l,删除某条计划任务的命令为crontab -r。
- 问:不错。如何把执行结果输出到文件?
- 答:30 23 * * * /path/to/script.sh > /path/to/logfile.log 2>&1
- 问:Linux 如何查看端口开放情况?
Expand Down
6 changes: 3 additions & 3 deletions posts/zh-CN/Coding/testing-react-with-mocha.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: 使用 Mocha + chai 测试 React 应用
date: 2023-05-07T06:57:00.000Z
summary: --- 最近在继续开发之前的 Kindle UI 库,想到该写一下测试,于是决定使用 Moc
summary: --- 最近在继续开发之前的 [Kindle UI](https://github.com/
---


---



最近在继续开发之前的 Kindle UI 库,想到该写一下测试,于是决定使用 Mocha 的测试方案(尝试一些新东西)。
最近在继续开发之前的 [Kindle UI](https://github.com/RiverTwilight/kindle-ui) 库,想到该写一下测试,于是决定使用 [Mocha](https://mochajs.org/) 的测试方案(尝试一些新东西)。

(此段由GPT生成👉)在开发过程中,保证代码质量和正确性是非常重要的。测试是达到这个目的的有效方法之一,特别是在 JavaScript 开发中。在 React 应用开发中,Mocha 和 Chai 是两个非常流行的测试框架。本文将介绍如何使用 Mocha 和 Chai 测试 React 应用。

Expand Down Expand Up @@ -126,7 +126,7 @@ module.exports = function getBabelConfig(api) {

之后我们可以愉快地编写测试了。

关于 react-test-renderer 的更多用法,可以参考官方文档
关于 react-test-renderer 的更多用法,可以参考[官方文档](https://reactjs.org/docs/test-renderer.html)

此处列举一些常见测试场景供参考:

Expand Down
2 changes: 1 addition & 1 deletion posts/zh-CN/Coding/what-i-learnd-from-a-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class _PopPageIntent extends Intent {}

在此之前,我从没接触过 flutter,然后借助 GPT 快速地开发出了我自己的一个产品。我给自己的 flutter 项目用上了这个逻辑,然后再原封不动的往这个仓库提交了 PR 。

作者回复称:我们应该全局应用这个设计,**并且大幅****修改****了我的代码**。我看完它的修改版本之后很震惊。
作者回复称:我们应该全局应用这个设计,**并且大幅****[修改](https://github.com/localsend/localsend/pull/543)****了我的代码**。我看完它的修改版本之后很震惊。

我一瞬间学到了几件事:

Expand Down
6 changes: 3 additions & 3 deletions posts/zh-CN/Life/captialisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ summary: ## 在开始折腾前请注意: - 不必要逼自己开通一个账

你需要提供护照、银行流水、地址证明。所有证件的名字必须全部匹配。

也可以参考这个Youtube 视频
也可以参考这个[Youtube 视频](https://www.youtube.com/watch?v=J6VrrEUYCeY)

## 海外卡组织在国内发行的卡

Expand Down Expand Up @@ -70,5 +70,5 @@ Visa 和 Mastercard 是全球比较受欢迎的组织,AMEX 主要在美国提
这些工具可以将法币兑换为虚拟币。

## 相关资源/教程
- Youtube 频道 1
- Youtube 频道 2
- [Youtube 频道 1](https://www.youtube.com/@erbiaoge)
- [Youtube 频道 2](https://www.youtube.com/@btcxiaolinzi)
4 changes: 2 additions & 2 deletions posts/zh-CN/Life/healthier-winter-and-autumn.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,5 @@ summary: 本文不卖药,不卖号,无推广,是纯粹写给读者的健
希望大家早日重视起身体健康,把身体真正融入大自然,顺势而为,为实现梦想打下坚实的基础。

## 参考
- https://en.wikipedia.org/wiki/Seasonal_affective_disorder
- https://zhuanlan.zhihu.com/p/140415641
- [https://en.wikipedia.org/wiki/Seasonal_affective_disorder](https://en.wikipedia.org/wiki/Seasonal_affective_disorder)
- [https://zhuanlan.zhihu.com/p/140415641](https://zhuanlan.zhihu.com/p/140415641)
2 changes: 1 addition & 1 deletion posts/zh-CN/Life/personal-showcase.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ summary: 本文展示我个人的特长能力,作为简历的补充。
能独立完成 UI 设计、游戏原型设计,有一定的设计心得与技巧积累。

作品主要发布在公众号上。
- 板绘| iPad 壁纸专辑(4K)
- [板绘| iPad 壁纸专辑(4K)](https://mp.weixin.qq.com/s?__biz=Mzg5MDgyMDg3NQ%3D%3D&mid=2247483842&idx=1&sn=566445503cc7775cb54cb81adcf44937&chksm=cfd781a6f8a008b07da71d605d99748318a78f69efecfc807833e08aa3b515b9b5f80247c960#rd)

## 其他
- 熟练的粤语听说
Expand Down
42 changes: 21 additions & 21 deletions posts/zh-CN/Tech/all-about-liner-algebra.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ summary: 本文将总结、提炼本科课程中的所有线性代数相关知
矩阵之间可以转化或者运算。包括:
- **线性运算**:两个矩阵可以相加/相减,如果它们的维度相同。矩阵线性运算是逐元素进行的。
- **乘法**:矩阵乘法包括矩阵与标量的乘法和矩阵与矩阵的乘法。矩阵与标量的乘法需要标量与每个元素相乘;矩阵与矩阵的乘法需要**第一个矩阵的列数与第二个矩阵的行数相同**
- **逆矩阵**:对于方阵,如果存在这样一个矩阵 B,使得 AB=BA=I(I 是单位矩阵),则 B 是 A 的逆矩阵,记为 A ^{-1}。
- **转置**:矩阵的转置是将其行换成列,或列换成行得到的新矩阵,记作 A^T。若矩阵与其转置的乘积为单位矩阵,则称这个矩阵为**正交矩阵**
- **逆矩阵**:对于方阵,如果存在这样一个矩阵 $$ B $$,使得 $$ AB=BA=I $$(I 是单位矩阵),则 B 是 $$ A $$ 的逆矩阵,记为 $$ A ^{-1} $$
- **转置**:矩阵的转置是将其行换成列,或列换成行得到的新矩阵,记作 $$ A^T $$。若矩阵与其转置的乘积为单位矩阵,则称这个矩阵为**正交矩阵**

矩阵自身可以进行**初等变换**,包括:
- 交换两行或两列
- 用某个数乘以某一行/列加到另一行/列中去
- 用一个数 k 乘以某一行或某一列
- 用一个数 $$ k $$ 乘以某一行或某一列

如果矩阵 A 经有限次初等变换变成矩阵 B,就称矩阵 A 与 B 等价。等价关系具有如下性质:
如果矩阵 $$ A $$ 经有限次初等变换变成矩阵 $$ B $$,就称矩阵 $$ A $$$$ B $$ 等价。等价关系具有如下性质:
- 反身性
- 传递性
- 对称性
Expand Down Expand Up @@ -81,9 +81,9 @@ $$

---

对于 A \times B,两个矩阵需满足**A 的列数等于 B 的行数**才能相乘****其乘积的行数等于A的行数,列数等于B的列数。
对于 $$ A \times B $$,两个矩阵需满足**A 的列数等于 B 的行数**才能相乘****其乘积的行数等于A的行数,列数等于B的列数。

矩阵的秩是一个非常重要的数字特征,反映了矩阵的行或列向量中**最大线性无关组**的大小,表示为R(A)
矩阵的秩是一个非常重要的数字特征,反映了矩阵的行或列向量中**最大线性无关组**的大小,表示为$$ R(A) $$

矩阵的秩具有如下性质:
- 矩阵的初等变换不改变它的秩
Expand All @@ -98,32 +98,32 @@ $$
首先,只有当**矩阵是方阵且行列式不为0时**,矩阵才有逆,称为可逆矩阵。

欲求逆矩阵有两种方法:
- ⭐️ **高斯消元法**:将矩阵 A 与单位矩阵 I 放在一起构成新的增广矩阵 [A∣I],对增广矩阵实施初等变换,当左侧变为单位矩阵时,增广矩阵的右侧将变成逆矩阵 A^{-1}
- ⭐️ **高斯消元法**:将矩阵 $$ A $$ 与单位矩阵 $$ I $$ 放在一起构成新的增广矩阵 $$ [A∣I] $$,对增广矩阵实施初等变换,当左侧变为单位矩阵时,增广矩阵的右侧将变成逆矩阵 $$ A^{-1} $$
- **代数余子式法**

矩阵的行列式是一个从方阵到实数或复数的函数,通常表示为det(A)。其几何意义为:
矩阵的行列式是一个从方阵到实数或复数的函数,通常表示为$$ det(A) $$。其几何意义为:
- 在二维空间中,两个向量构成的矩阵的行列式表示由这两个向量构成的平行四边形的面积,带正负号表示方向或定向。
- 在三维空间中,三个向量构成的矩阵的行列式表示由这三个向量构成的平行六面体的体积,同样带有方向性。

行列式具有如下性质:
- **转置不改变矩阵行列式**,即 det(A) = det(A^T)
- **转置不改变矩阵行列式**,即 $$ det(A) = det(A^T) $$
- 如果行列式中**有两行成比例**,那么行列式的值为零
- 若用 k 乘以行列式 A 的每一个元素得到行列式 B,那么 B = -kA
- 若用 k 乘以行列式 A 的每一个元素得到行列式 B,那么 $$ B = -kA $$

要计算行列式的值,
- 二阶行列式:对于形如\begin{bmatrix}
- 二阶行列式:对于形如$$ \begin{bmatrix}
a & b\\
c & d\\
\end{bmatrix}的二阶行列式,计算方法为 ad - bc
- 三阶行列式:对于形如\begin{bmatrix}
\end{bmatrix} $$的二阶行列式,计算方法为 $$ ad - bc $$
- 三阶行列式:对于形如$$ \begin{bmatrix}
a_{11} & a_{12} & a_{13}\\
a_{21} & a_{22} & a_{23}\\a_{31} & a_{32} & a_{33}\\
\end{bmatrix}的三阶行列式,计算方法为**主对角线乘积之和减去副对角线乘积之和**即a_{11}a_{22}a_{33} + a_{12}a_{23}a_{31} + a_{13}a_{21}a_{32} - a_{13}a_{22}a_{31} - a_{21}a_{12}a_{33} - a_{23}a_{32}a_{11}
\end{bmatrix} $$的三阶行列式,计算方法为**主对角线乘积之和减去副对角线乘积之和**,$$ a_{11}a_{22}a_{33} + a_{12}a_{23}a_{31} + a_{13}a_{21}a_{32} - a_{13}a_{22}a_{31} - a_{21}a_{12}a_{33} - a_{23}a_{32}a_{11} $$
- 四阶及更高阶行列式:可以通过代数余子式计算。

如果行列式内有多个矩阵,可以遵循这些运算法则:
- |AB| = |A||B|
- |A^n|= |A|^n
- $$ |AB| = |A||B| $$
- $$ |A^n|= |A|^n $$



Expand All @@ -137,11 +137,11 @@ a_{21} & a_{22} & a_{23}\\a_{31} & a_{32} & a_{33}\\

可以遵循以下步骤:

1. **求系数矩阵的秩**:系数矩阵 *A* 是由线性方程组中的系数组成的矩阵。
2. **求增广矩阵的秩**:增广矩阵 [A∣b] 是在系数矩阵旁边添加一列常数项 *b ** *形成的矩阵。
1. **求系数矩阵的秩**:系数矩阵 $$ A $$ 是由线性方程组中的系数组成的矩阵。
2. **求增广矩阵的秩**:增广矩阵 $$ [A∣b] $$ 是在系数矩阵旁边添加一列常数项 $$ b $$* *形成的矩阵。

*rank(A)=rank([A∣b])=n*(其中 *n* 是变量的数目),则系统有唯一解。
$$ rank(A)=rank([A∣b])=n $$(其中 *n* 是变量的数目),则系统有唯一解。

*rank(A)=rank([A∣b])<n*,则系统有无穷多解。
$$ rank(A)=rank([A∣b])<n $$,则系统有无穷多解。

*rank(A)<rank([A∣b])*,则系统无解。
$$ rank(A)<rank([A∣b]) $$,则系统无解。
Loading

0 comments on commit 13247fc

Please sign in to comment.