网络管理
netstat -anp:查看所有正在监听运行的端口
常见参数: -a (all)显示所有选项,默认不显示LISTEN相关
-t (tcp)仅显示tcp相关选项
-u (udp)仅显示udp相关选项
-n 拒绝显示别名,能显示数字的全部转化成数字。
-l 仅列出有在 Listen (监听) 的服務状态 -p 显示建立相关链接的程序名
-r 显示路由信息,路由表
-e 显示扩展信息,例如uid等
-s 按各个协议进行统计
-c 每隔一个固定时间,执行该netstat命令。
防火墙
添加允许端口
firewall-cmd —permanent —add-port=1554/tcp firewall-cmd —reload #添加完端口需重新加载
Sed命令
sed 命令选项
选项 | 功能 |
---|---|
-e | 直接在命令行模式上进行sed动作编辑,此为默认选项 |
-f | 将sed的动作写在一个文件内,用–f filename 执行filename内的sed动作 |
-i | 直接修改文件内容 |
-n | 只打印模式匹配的行 |
-r | 支持扩展正则表达式 |
-h —help | 显示帮助 |
-v —version | 显示版本信息 |
行内代码
💡 Tips:可通过 markdown 语法(
+ `code` +
+空格
)或者快捷键ctrl/cmd
+E
快速插入行内代码。
在文本中使用行内代码
,可以顺畅地显示代码变量名。
代码块
💡 Tips:输入
/代码块
或点击上方工具栏点击上方工具栏,选择「代码块」、插入代码卡片。
代码块同时支持多种颜色主题:
export default class QuickSort extends Sort {
sort(originalArray) {
const array = [...originalArray];
if (array.length <= 1) {
return array;
}
// Init left and right arrays.
const leftArray = [];
const rightArray = [];
// Take the first element of array as a pivot.
const pivotElement = array.shift();
const centerArray = [pivotElement];
// Split all array elements between left, center and right arrays.
while (array.length) {
const currentElement = array.shift();
// Call visiting callback.
this.callbacks.visitingCallback(currentElement);
if (this.comparator.equal(currentElement, pivotElement)) {
centerArray.push(currentElement);
} else if (this.comparator.lessThan(currentElement, pivotElement)) {
leftArray.push(currentElement);
} else {
rightArray.push(currentElement);
}
}
// Sort left and right arrays.
const leftArraySorted = this.sort(leftArray);
const rightArraySorted = this.sort(rightArray);
return leftArraySorted.concat(centerArray, rightArraySorted);
}
}
export default class QuickSort extends Sort {
sort(originalArray) {
const array = [...originalArray];
if (array.length <= 1) {
return array;
}
// Init left and right arrays.
const leftArray = [];
const rightArray = [];
// Take the first element of array as a pivot.
const pivotElement = array.shift();
const centerArray = [pivotElement];
// Split all array elements between left, center and right arrays.
while (array.length) {
const currentElement = array.shift();
// Call visiting callback.
this.callbacks.visitingCallback(currentElement);
if (this.comparator.equal(currentElement, pivotElement)) {
centerArray.push(currentElement);
} else if (this.comparator.lessThan(currentElement, pivotElement)) {
leftArray.push(currentElement);
} else {
rightArray.push(currentElement);
}
}
// Sort left and right arrays.
const leftArraySorted = this.sort(leftArray);
const rightArraySorted = this.sort(rightArray);
return leftArraySorted.concat(centerArray, rightArraySorted);
}
}
export default class QuickSort extends Sort {
sort(originalArray) {
const array = [...originalArray];
if (array.length <= 1) {
return array;
}
// Init left and right arrays.
const leftArray = [];
const rightArray = [];
// Take the first element of array as a pivot.
const pivotElement = array.shift();
const centerArray = [pivotElement];
// Split all array elements between left, center and right arrays.
while (array.length) {
const currentElement = array.shift();
// Call visiting callback.
this.callbacks.visitingCallback(currentElement);
if (this.comparator.equal(currentElement, pivotElement)) {
centerArray.push(currentElement);
} else if (this.comparator.lessThan(currentElement, pivotElement)) {
leftArray.push(currentElement);
} else {
rightArray.push(currentElement);
}
}
// Sort left and right arrays.
const leftArraySorted = this.sort(leftArray);
const rightArraySorted = this.sort(rightArray);
return leftArraySorted.concat(centerArray, rightArraySorted);
}
}
数学公式
💡 Tips:输入
/公式
或点击上方工具栏点击上方工具栏,选择「公式」、插入公式卡片。
公式支持行内嵌套:,也支持块级嵌入。
画板
💡 Tips:输入
/画板
或点击上方工具栏,选择「画板」、绘制流程图、架构图等各种图形。
文本绘图
💡 Tips:输入
/文本绘图
点击上方工具栏,选择「文本绘图」、插入文本绘图卡片。
支持 plantuml、mermaid 等多种格式,点击预览
可看到图形。具体代码样式见说明文档。