简单的HTML
我们可以使用Text 记事本来编写html123<div>大家好我是html</div>
简单的Vue
12345678910111213141516171819202122232425262728293031323334353637383940414243_你好, {{ msg }}_<RedDiv>_当前计数为: {{ count }}_</RedDiv><button @click="count++">点我!</button><script>import { h, ref } from 'vue'const RedDiv = (_, ctx) => h( 'div', { class: 'red-div', }, ctx.slots.default())export default { components: { RedDiv, }, setup() { ...
使用Dockerile部署带有ssh的Ubuntu
一、Dockerfile 展示12345678910111213141516171819FROM ubuntu:20.04 ENV TZ Asia/ShanghaiENV LANG zh_CN.UTF-8RUN echo 'root:root' |chpasswdRUN echo "deb http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse\n \deb http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse \n \deb http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse\n \deb http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multivers ...
Git的基本代理设置
一、 设置代理1.当前Git仓库代理(临时)1git config http.proxy http://127.0.0.1:10808
2.全局设置 (永久)1git config --global http.proxy http://127.0.0.1:10808
二、取消代理1.取消当前的Git仓库代理1git config --unset http.proxy
1.取消全局的Git仓库代理1git config --global --unset http.proxy
Ubuntu20.04国内源合集
Ubuntu20.04
清华源
阿里源
中科大源
网易源
清华源1234567891011121314151617181920deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ foc ...
Systemctl简单应用
systemctl
systemctl是linux中的服务管理,是一个systemd的工具,主要负责控制systemd系统和服务管理器在ubuntu 、centos等一系列发行版中可用。可以方便的管理需要启动的服务等。可以实现开机自启动、出错重启和定时重启等等功能。
简单的演示
12345678910[Unit]Description= a sample thing[Service]type=simpleRestart=on-failureExecStart=/home/ubuntu/mimc-fast-aarch64[Install]WantedBy=multi-user.target
一、 [Unit]
定义启动的顺序以及依赖的关系
可选项
描述
Description
主要是填写一些信息,用于当前服务的简单描述
Documentation
可以用来指定文档的位置,用于当前服务文档查询
After
可以指定在哪些服务之后进行启动
Before
可以指定在哪些服务之前进行启动
Wants
可以指定服务依赖于哪些服务(这种依赖是”弱依赖”,即使所依赖 ...
黑暗森林DF显卡开图(WSL2)
本文作者: WGB Twitter: WGB5445
所需工具
Windows电脑
10系以上显卡
网络
操作过程
升级Windows系统为预览版
安装WSL2内核、安装或升级WSL ubuntu为WSL2
安装显卡的WSL驱动
下载ubuntu上必要的工具
安装ubuntu的cuda工具
下载源码
编译
执行
修改浏览器设置
成功开图
一、升级Windows系统为预览版或Windows11为了在WSL2 上启用NVIDIA CUDA,需要将系统升级为Windows 10 的 Windows 预览体验计划或者Windows 11对于Windows 10,需要先注册 Windows预览体验计划,并升级预览体验成员版本需要升级为windows10预览版内部版本 19044.1263 或更高版本可以按照微软官方的步骤进行注册升级https://insider.windows.com/zh-cn/getting-started#register
二、安装WSL2内核以及Ubuntu在升级为预览版以后WSL2就可以支持调用显卡资源,安装WSL2以及Ubuntu可以使 ...
Ubuntu上编译xmrig
Ubuntu上编译xmrig
本文作者: WGB Twitter: wgb5445
工具
ubuntu系统
网络
步骤
安装编译工具以及需要的库
下载源码
编译
成功
一、安装工具以及需要的库在Ubuntu上编译xmrig需要使用编译工具 make cmake gcc g++等下载代码需要使用git编译xmrig时可以使用附加库libhwloc-dev libuv1-dev libssl-dev如果不需要这些库,可以在编译时加选项跳过
1. 更新apt源先更新源以防止出现找不到包等问题
1sudo apt update
2. 安装1sudo apt install make cmake gcc g++ git libhwloc-dev libuv1-dev libssl-dev
二、下载源码通过git工具下载xmrig源码(国内用户链接可能较慢)
1git clone https://github.com/xmrig/xmrig.git
三、编译1. 进入xmrig文件夹1cd xmrig/
2. 创建build文件夹1mkdir build
3. ...
正则表达式的基本规则
正则表达式的基本规则
. - 除换行符以外的所有字符。
^ - 字符串开头。
$ - 字符串结尾。
\d,\w,\s - 匹配数字、字符、空格。
\D,\W,\S - 匹配非数字、非字符、非空格。
[abc] - 匹配 a、b 或 c 中的一个字母。
[a-z] - 匹配 a 到 z 中的一个字母。
[^abc] - 匹配除了 a、b 或 c 中的其他字母。
aa|bb - 匹配 aa 或 bb。
? - 0 次或 1 次匹配。
* - 匹配 0 次或多次。
+ - ...
Clion-Docker的C\C++调试环境
环境信息
CLion 2021.1.1
Docker version 20.10.8, build 3967b7d
Docker镜像 Ubuntu20.04
一、制作镜像1. 编写Dockerfile1234567891011121314151617181920212223242526272829FROM ubuntu:20.04 RUN echo 'root:root' |chpasswdRUN echo "deb http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse\n \deb http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse \n \deb http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse\n \deb http://mirr ...