Преглед на файлове

Merge branch 'lab' of https://gitee.com/sun1040084806/notes into lab

seamew преди 3 години
родител
ревизия
34281df56e

+ 117 - 0
linux/tmux/tmux.md

@@ -0,0 +1,117 @@
+>[TOC]
+
+
+# 1、tmux简介
+
+tmux (opens new window)是linux中一种管理窗口的程序,它提供了一个Session随时存储和恢复的功能。
+
+# 2、软件安装
+
+```shell
+# Mac
+$ brew install tmux
+
+# Ubuntu 或 Debian
+$ sudo apt-get install tmux
+
+# CentOS 或 Fedor可以使用yum/dnf/brew等方式安装,brew版本更高些
+$ yum install tmux
+```
+
+# 3、软件的使用
+
+```shell
+# 加载配置文件
+tmux source-file ~/.tmux.conf
+
+# 新建会话
+tmux new -s hdcms
+# 查看会话
+ctrl+b s
+# 重命名会话
+Ctrl+b $
+
+# 创建窗口
+ctrl+b c
+# 切换到2号窗口
+ctrl+b 2
+# 重命名窗口
+ctrl+b , 
+# 关闭窗口
+ctrl+b &
+
+# 水平拆分出一个新窗格
+ctrl+b %
+# 垂直拆分窗格
+ctrl+b "
+# 切换到下一个窗格
+ctrl+b o
+# 关闭窗格
+ctrl+b x
+```
+
+# 4、保存回话
+
+```shell
+# 安装插件
+git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
+git clone https://github.com/tmux-plugins/tmux-resurrect ~/.tmux/plugins/resurrect
+
+# 修改配置文件 ~/.tmux.conf添加以下内容
+# 自动保存会话
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-sensible'
+set -g @plugin 'tmux-plugins/tmux-resurrect'
+set -g @plugin 'tmux-plugins/tmux-continuum'
+set -g @continuum-save-interval '15'
+set -g @continuum-restore 'on'
+set -g @resurrect-capture-pane-contents 'on'
+run '~/.tmux/plugins/tpm/tpm'
+
+run-shell ~/.tmux/plugins/resurrect/resurrect.tmux
+
+# 返回终端重新加载配置项
+tmux source ~/.tmux.conf
+
+# 然后执行命令安装插件,默认的prefix是crl+b
+prefix + I 
+
+# 保存会话
+prefix + Ctrl-s
+
+# 恢复会话
+prefix + Ctrl-r
+
+```
+
+# 5、常用快捷键
+
+## 5.1、窗格快捷键
+
+| **快捷键**        | **说明**                                   |
+| ----------------- | ------------------------------------------ |
+| Ctrl+b %          | 划分左右两个窗格                           |
+| Ctrl+b "          | 划分上下两个窗格                           |
+| Ctrl+b ;          | 切换到上一个窗格                           |
+| Ctrl+b o          | 光标切换到下一个窗格                       |
+| Ctrl+b {          | 当前窗格左移                               |
+| Ctrl+b }          | 当前窗格右移                               |
+| Ctrl+b Ctrl+o     | 当前窗格上移                               |
+| Ctrl+b Alt+o      | 当前窗格下移                               |
+| Ctrl+b x          | 关闭当前窗格                               |
+| Ctrl+b !          | 将当前窗格拆分为一个独立窗口               |
+| Ctrl+b z          | 当前窗格全屏显示,再使用一次会变回原来大小 |
+| Ctrl+b q          | 显示窗格编号                               |
+| Ctrl+b Alt+方向键 | 调整窗格大小                               |
+
+## 5.2、窗口管理
+
+| 快捷键   | 说明                                              |
+| -------- | ------------------------------------------------- |
+| Ctrl+b p | 切换到上一个窗口(按照状态栏上的顺序)            |
+| Ctrl+b n | 切换到下一个窗口                                  |
+| Ctrl+b   | 切换到指定编号的窗口,number 是状态栏上的窗口编号 |
+| Ctrl+b w | 从列表中选择窗口                                  |
+| ctrl+b & | 关闭当前窗口                                      |
+| ctrl+b x | 删除窗口                                          |
+

+ 23 - 0
linux/tmux/配置文件md

@@ -0,0 +1,23 @@
+````shell
+# .tmux.conf
+run-shell /home/seamew/software/tmux-onedark-theme/tmux-onedark-theme.tmux
+set -g @onedark_widgets " "
+set -g @onedark_time_format "%I:%M "
+set -g @onedark_date_format "%m/%d"
+set-option -g status-position bottom
+# 窗口序号从1开始计数
+set -g base-index 1
+
+# 自动保存会话
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-sensible'
+set -g @plugin 'tmux-plugins/tmux-resurrect'
+set -g @plugin 'tmux-plugins/tmux-continuum'
+set -g @continuum-save-interval '15'
+set -g @continuum-restore 'on'
+set -g @resurrect-capture-pane-contents 'on'
+run '~/.tmux/plugins/tpm/tpm'
+
+run-shell ~/.tmux/plugins/resurrect/resurrect.tmux
+````
+

+ 11 - 12
linux/zsh/zsh的配置文件.md

@@ -62,7 +62,17 @@ ZSH_THEME="ys"
  
 # z命令快速跳转目录     x命令解压一切文件         命令行可以直接google  
 plugins=(
-  git z zsh-autosuggestions extract zsh-syntax-highlighting mvn zsh-completions
+  git 
+  z 
+  zsh-autosuggestions 
+  extract 
+  zsh-syntax-highlighting 
+  mvn 
+  zsh-completions 
+  docker 
+  npm
+  node 
+  yarn
 )
  
 source $ZSH/oh-my-zsh.sh
@@ -95,16 +105,6 @@ source $ZSH/oh-my-zsh.sh
 # Example aliases
 # alias zshconfig="mate ~/.zshrc"
 # alias ohmyzsh="mate ~/.oh-my-zsh"
-# 环境变量
-# java
-export JAVA_HOME=/usr/local/java/jdk1.8.0_301
-export JRE_HOME=${JAVA_HOME}/jre
-export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
-export PATH=${JAVA_HOME}/bin:$PATH
-# maven
-MAVEN_HOME=/usr/local/maven/apache-maven-3.8.2
-export MAVEN_HOME
-export PATH=${PATH}:${MAVEN_HOME}/bin
 # 解决复制卡顿问题
 pasteinit() {
   OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
@@ -118,5 +118,4 @@ zstyle :bracketed-paste-magic paste-init pasteinit
 zstyle :bracketed-paste-magic paste-finish pastefinish 
 # 自动更新的时间间隔,单位是天,这里设置 30 天更新一次
 export UPDATE_ZSH_DAYS=1
-
 ```

+ 34 - 3
前端/node/npm安装和配置.md

@@ -1,13 +1,43 @@
-# 1.node的安装
+# 1、node的安装
+
+## 1.1、官方版本安装
 
 进入[node](https://nodejs.org/zh-cn/)官网下载安装包
 安装选择下面选项
 ![image-20210911173404485](../../照片/image-20210911173404485.png)
 
-# 2.更改npm和yarn依赖包全局下载和缓存路径
+## 1.2、nvm(windows)
 
-1. 在 D盘新建一个目录,用来存放 npm 或 yarn 的 cache 和 依赖包文件
+windows 用户请下载安装[nvm-windows](https://github.com/coreybutler/nvm-windows)
+```shell
+nvm install <version> [arch]: The version can be a specific version, "latest" for the latest current version, or "lts" for the most recent LTS version. Optionally specify whether to install the 32 or 64 bit version (defaults to system arch). Set [arch] to "all" to install 32 AND 64 bit versions. Add --insecure to the end of this command to bypass SSL validation of the remote download server.
+
+nvm list [available]: List the node.js installations. Type available at the end to show a list of versions available for download.
+nvm on: Enable node.js version management.
+
+nvm off: Disable node.js version management (does not uninstall anything).
+
+nvm use <version> [arch]: Switch to use the specified version. Optionally use latest, lts, or newest. newest is the latest installed version. Optionally specify 32/64bit architecture. nvm use <arch> will continue using the selected version, but switch to 32/64 bit mode. 
+
+nvm node_mirror <node_mirror_url>: Set the node mirror.People in China can use https://npmmirror.com/mirrors/node/
+
+nvm npm_mirror <npm_mirror_url>: Set the npm mirror.People in China can use https://npmmirror.com/mirrors/npm/
 ```
+## 1.3、n(linux)
+
+```shell
+# 1.安装n
+curl -L https://git.io/n-install | bash
+
+# 2.安装node
+n 14
+n lts
+```
+
+# 2、更改npm和yarn依赖包全局下载和缓存路径
+
+1. 在 D盘新建一个目录,用来存放 npm 或 yarn 的 cache 和 依赖包文件
+```shell
 D:\node_package\npm
 
 D:\node_package\npm_cache
@@ -27,6 +57,7 @@ npm config set registry https://registry.npm.taobao.org/
 
 
 # yarn
+yarn config set prefix "D:\node_package\yarn"
 yarn config set global-folder "D:\node_package\yarn"
 yarn config set cache-folder "D:\node_package\yarn_cache"
 yarn config set registry https://registry.npm.taobao.org/

+ 9 - 0
前端/vue/vue2.md

@@ -202,6 +202,15 @@
 
 7. 注意:通过```this.$refs.xxx.$on('atguigu',回调)```绑定自定义事件时,回调<span style="color:red">要么配置在methods中</span>,<span style="color:red">要么用箭头函数</span>,否则this指向会出问题!
 
+7. **特别注意**使用```this.$refs.xxx.$on('atguigu',回调)```比使用@直接绑定有优势
+```js
+// 像这样可以相应两次atguigu事件,但是使用@则不行
+this.$refs.student.$on('atguigu',this.getStudentName) //绑定自定义事件
+this.$refs.student.$on('atguigu',()=>{
+	console.log("qwe");	
+})
+```
+
 ## 全局事件总线(GlobalEventBus)
 
 1. 一种组件间通信的方式,适用于<span style="color:red">任意组件间通信</span>。

+ 0 - 0
后端/JVM虚拟机/1.走进JAVA.md


+ 1 - 0
后端/JavaWeb/JavaWeb.md

@@ -333,6 +333,7 @@ req.getRequestDispatcher("/image").forward(req,resp);
 
 cookie
 * 客户端技术(响应,请求)
+
 session
 * 服务器技术,利用这个技术,可以保存用户的会话信息!我们可以把信息或者数据放入session
 

+ 2 - 2
大数据/kafka/1.kafka笔记.md

@@ -109,7 +109,7 @@ ls /brokers/ids/
 
 * 通过kafka命令向zk中创建⼀个主题
 ```
-./kafka-topics.sh --create --zookeeper 192.168.245.21:2181 --replication-factor 1 --partitions 1 --topic test
+./kafka-topics.sh --create --zookeeper 127.0.0.1:2181 --replication-factor 1 --partitions 1 --topic test
 ```
 
 * 查看当前zk中所有的主题
@@ -166,7 +166,7 @@ kafka⾃带了⼀个producer命令客户端,可以从本地⽂件中读取内
 
 不同的消费组订阅同⼀个topic,那么不同的消费组中只有⼀个消费者能收到消息。实际上也是多个消费组中的多个消费者收到了同⼀个消息。
 ```
-./kafka-console-consumer.sh --bootstrap-server 192.168.245.21:9092 --consumer-property group.id=testGroup1 --topic test
+./kafka-console-consumer.sh --bootstrap-server 127.0.0.1:2181 --consumer-property group.id=testGroup1 --topic test
 
 ./kafka-console-consumer.sh --bootstrap-server 192.168.245.21:9092 --consumer-property group.id=testGroup2 --topic test
 ```

+ 1 - 1
大数据/云平台安装文档/安装云平台环境.md

@@ -124,7 +124,7 @@ docker-compose --version
 
 ## 3.0安装注意事项
 
-本文档Harbor安装在单独一台虚拟机上面,如果只有三台机器,请将下面的server.harbor.com换成自己的IP,例如master节点就换为192.168.238.20
+本文档Harbor安装在单独一台虚拟机上面,如果只有三台机器,请将下面的server.harbor.com换成固定的IP(这里的固定IP意思是安装harbor的虚拟机的IP),例如将harbor仓库安装在master节点就将server.harbor.com换为192.168.238.20。
 
 ## 3.1安装Harbor