首页
留言
友链
关于
Search
1
思源笔记docker私有化部署及使用体验分享
1,193 阅读
2
windows11 远程提示:为安全考虑,已锁定该用户帐户,原因是登录尝试或密码更改尝试过多。
619 阅读
3
Pointer-Focus:一款功能强大的教学、录屏辅助软件
389 阅读
4
在vue-cli3使用sass(scss)定义的全局样式及变量
323 阅读
5
使用cspell对项目做拼写规范检查
264 阅读
Web前端
CSS
JavaScript
交互
Vue
小程序
后端
运维
生活
其他
转载
软件
登录
Search
标签搜索
docker
DevOps
magic-boot
Linux
酷壳
RabbitMQ
Node
git
工具
Vue
MybatisPlus
clickhouse
规范
前端
产品
markdown
axios
H5
经纬度
vue-cli
朱治龙
累计撰写
118
篇文章
累计收到
0
条评论
首页
栏目
Web前端
CSS
JavaScript
交互
Vue
小程序
后端
运维
生活
其他
转载
软件
页面
留言
友链
关于
搜索到
6
篇与
软件
的结果
2023-12-26
推荐一款统计代码行数的VSCode插件
基本介绍在撰写软著文档或做项目结项时我们一般都需要统计工程的代码行数,如果逐个文件进行统计的话,不仅费时费力,还不一定能得到准确的数据,所以我就在做这工作的时候找了下相关的工具,发现 VSCode 有一款好用的插件:Lines of Code(LOC)插件市场链接:https://marketplace.visualstudio.com/items?itemName=lyzerk.linecounterGithub 链接:https://github.com/alimozdemir/vscode-linecounter该插件当前的介绍信息见截图:基本使用安装后,可使用 Ctrl+Shift+P 打开 命令面板,然后输入 LineCount,显示如下选项:相关选项对应的是:LineCount:Count Workspace files:统计当前工作区所有文件的代码行数LineCount:Count current file:统计当前文件的代码行数选择 LineCount:Count Workspace files 后,系统将进行相关统计操作,统计完后会在当前工程的out目录生成 linecounter.txt 和 linecounter.json 文件,其中 linecounter.txt 文件内容如下:=============================================================================== EXTENSION NAME : linecounter EXTENSION VERSION : 0.2.7 ------------------------------------------------------------------------------- count time : 2023-12-27 09:21:44 count workspace : d:\GitRoot\SE\console\console-ui total files : 563 total code lines : 72734 total comment lines : 3925 total blank lines : 3554 statistics | extension| total code| total comment| total blank|percent| ------------------------------------------------------------------------- | .devIstio| 44| 2| 7| 0.060| | .stage| 34| 0| 0| 0.047| | .production| 41| 0| 0| 0.056| | | 193| 74| 42| 0.27| | .development| 36| 0| 0| 0.049| | .js| 13156| 1998| 752| 18| | .html| 2347| 6| 333| 3.2| | .md| 1660| 243| 419| 2.3| | .svg| 1743| 0| 107| 2.4| | .json| 3403| 7| 5| 4.7| | .yaml| 4153| 17| 626| 5.7| | .stg| 9| 2| 5| 0.012| | .blsc| 10| 2| 7| 0.014| | .conf| 103| 5| 27| 0.14| | .key| 30| 0| 0| 0.041| | .yml| 71| 0| 4| 0.098| | .crt| 28| 0| 0| 0.038| | .scss| 1778| 83| 312| 2.4| | .vue| 43126| 1467| 715| 59| | .css| 769| 19| 193| 1.1| ------------------------------------------------------------------------- .browserslistrc, code is 3, comment is 0, blank is 0. .editorconfig, code is 9, comment is 0, blank is 1. .env, code is 19, comment is 0, blank is 0. .env.blsc.development, code is 20, comment is 0, blank is 0. .env.blsc.devIstio, code is 20, comment is 0, blank is 0. .env.blsc.production, code is 23, comment is 0, blank is 0. .env.blsc.stage, code is 21, comment is 0, blank is 0. .env.development, code is 16, comment is 0, blank is 0. .env.devIstio, code is 14, comment is 0, blank is 0. .env.production, code is 18, comment is 0, blank is 0. .env.stage, code is 13, comment is 0, blank is 0. .eslintignore, code is 1, comment is 4, blank is 0. .eslintrc.js, code is 196, comment is 129, blank is 0. .gitignore, code is 20, comment is 0, blank is 2. .prettierrc, code is 6, comment is 0, blank is 0. admin.html, code is 21, comment is 2, blank is 0. cspell.json, code is 96, comment is 7, blank is 2. default.conf, code is 14, comment is 0, blank is 2. ... 统计的文件列表 src\views\userCenter\modals\WarningCcLimitModal.vue, code is 218, comment is 5, blank is 1. vite.config.js, code is 183, comment is 30, blank is 5. ===============================================================================从上面的信息不难看出当前工程内的文件总数及总代码行数, 包括注释行数及空行数。其中该插件有不少配置信息,可以在统计钱根据实际情况进行文件排除等场景,配置信息示例数据如下:{ "LineCount.showStatusBarItem": true, "LineCount.statistics": true, "LineCount.includes": [ "**/*" ], "LineCount.excludes": [ "**/.vscode/**", "**/node_modules/**" ], "LineCount.output": { "txt": true, "json": true, "csv": true, "md": true, "outdir":"out" }, "LineCount.sort": "filename", "LineCount.order": "asc", "LineCount.comment":[ { "ext": ["c","cpp","java"], "separator": { "linecomment": "//", "linetol":false, "blockstart": "/*", "blockend": "*/", "blocktol": false, "string":{ "doublequotes": true, "singlequotes": true } } }, { "ext": ["html"], "separator": { "blockstart": "<!--", "blockend": "-->", } } ] }
2023年12月26日
89 阅读
0 评论
0 点赞
2023-06-06
Ubuntu 添加FRP客户端自启动
背景介绍今年618 的时候购置了一台迷你主机,主要用于家庭内部服务器使用,主要基于Docker 部署其他应用,而 Ubuntu 作为 docker 原生支持最好的操作系统,而且还有漂亮的桌面,当然也就成了本迷你主机的操作系统首选。装完系统后,部署的很多应用只能内部使用,为了方便,当然不能只局限于家庭内部环境使用。结合之前不熟的FRP服务端,完全可以对外提供WEB服务,于是便有了本期的教程。下载 FRPFRP 是服务端和客户端打包在一个压缩包文件里的,可以直接从github下载就好。FRP 发布地址:https://github.com/fatedier/frp/releases本处直接下载最新的0.49.0 版本,根据操作系统,本处选择frp_0.49.0_linux_amd64.tar.gz 进行下载:wget https://github.com/fatedier/frp/releases/download/v0.49.0/frp_0.49.0_linux_amd64.tar.gz下载后 解压文件tar -zxvf frp_0.49.0_linux_amd64.tar.gz将解压的文件移动到当前用户有权限的目录,本案例中移动到 /data/apps/frp目录编辑 frpc.ini 文件本处结合实际情况,修改内容如下,部分涉密数据做了调整:[common] server_addr = SERVER_IP server_port = 7000 # for authentication token = TOKEN log_file = /data/apps/frp/frpc.log log_level = info log_max_days = 30 [home_ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 4000 [home_web_pan] type = http local_ip = 127.0.0.1 local_port = 80 http_user = zhuzl http_pwd = PASSWORD subdomain = pan [home_web_kod] type = http local_ip = 127.0.0.1 local_port = 80 http_user = zhuzl http_pwd = PASSWORD subdomain = kod 配置完成后,可直接运行frpc 验证是否OK../frpc若有问题,可检查frpc.ini相关配置信息是否正确配置frpc自启动配置自启动过程中,为避免权限相关问题,本处直接切换为 root 账号添加 frpc.servicevi /etc/systemd/system/frpc.service输入如下服务配置内容[Unit] Description=Frp Client Service After=network.target [Service] Type=simple User=jiuzilong Restart=on-failure RestartSec=5s ExecStart=/data/apps/frp/frpc -c /data/apps/frp/frpc.ini [Install] WantedBy=multi-user.target 启用服务# 启用服务 systemctl enable frpc.service # 禁用服务 systemctl disable frpc.service重启服务systemctl daemon-reload systemctl start frpc验证服务启动状态systemctl status frpc参考链接FRP官方文档: https://gofrp.org/docs/overview/FRP服务端安装并设置开机自启动: https://blog.zhuzhilong.cn/software/install-frps-as-service.html推荐另一种docker compose 的启动方式:version: '3.3' services: frpc: restart: always network_mode: host volumes: - './frpc.ini:/etc/frp/frpc.ini' container_name: frpc image: snowdreamtech/frpc
2023年06月06日
16 阅读
0 评论
0 点赞
2023-05-14
FRP服务端安装并设置开机自启动
背景介绍之前一直有使用FRP做内网穿透,一般主要用于远程桌面和对外提供http服务进行测试,由于域名备案信息被撤销,原有解析过去的二级域名被拦截了,所以考虑将FRP 服务端部署到一台墙外的服务器上去,搜了一圈没找到之前的部署记录,本次也就只好将安装过程记录备忘了。安装时间:2023-05-14 15:51安装下载最新版本的frpfrp 在GitHub的地址是,# 进入用户目录 cd /usr/local # 下载frp 最新版, wget https://github.com/fatedier/frp/releases/download/v0.48.0/frp_0.48.0_linux_amd64.tar.gz # 解压 tar -zxvf frp_0.48.0_linux_amd64.tar.gz配置打开服务端配置文件vi /usr/local/frp/frps.ini 参考frps_full.ini,将服务端配置文件(frps.ini)修改为如下内容[common] bind_addr = 0.0.0.0 bind_port = 7000 token = TOKEN_INFO # udp port to help make udp hole to penetrate nat bind_udp_port = 7001 # if you want to support virtual host, you must set the http port for listening (optional) # Note: http port and https port can be same with bind_port vhost_http_port = 80 vhost_https_port = 443 # console or real logFile path like ./frps.log log_file = ./frps.log # set dashboard_addr and dashboard_port to view dashboard of frps # dashboard_addr's default value is same with bind_addr # dashboard is available only if dashboard_port is set dashboard_addr = 0.0.0.0 dashboard_port = 7500 # dashboard user and passwd for basic auth protect dashboard_user = admin dashboard_pwd = admin # dashboard TLS mode dashboard_tls_mode = false # authentication_method specifies what authentication method to use authenticate frpc with frps. # If "token" is specified - token will be read into login message. # If "oidc" is specified - OIDC (Open ID Connect) token will be issued using OIDC settings. By default, this value is "token". authentication_method = token # if subdomain_host is not empty, you can set subdomain when type is http or https in frpc's configure file # when subdomain is test, the host used by routing is test.frps.com subdomain_host = lan.dev.trswcm.com自启动添加自启动文件vi /etc/systemd/system/frps.service输入如下内容:[Unit] Description=Frp Server Service After=network.target [Service] Type=simple User=root Restart=on-failure RestartSec=5s ExecStart=/usr/local/frp/frps -c /usr/local/frp/frps.ini [Install] WantedBy=multi-user.target添加可执行权限chmod +x /etc/systemd/system/frps.service注册服务systemctl enable frps.service当出现如下提示信息后表示注册成功 [root@VM-0-9-centos systemd]# systemctl enable frps.service Created symlink from /etc/systemd/system/multi-user.target.wants/frps.service to /etc/systemd/system/frps.service.启动服务systemctl daemon-reload systemctl start frps启动过程有可能会报错,报错的话,请根据错误提示进行相应调整查看服务状态systemctl status frps出现如下截图所示信息则表示已启动成功:推荐另一种简单的docker-compose 的方式:‵‵‵ yamlversion: '3.3'services:frps: restart: always network_mode: host volumes: - './frps.ini:/etc/frp/frps.ini' container_name: frps image: snowdreamtech/frps
2023年05月14日
20 阅读
0 评论
0 点赞
2022-09-15
思源笔记docker私有化部署及使用体验分享
说明考虑到网络问题、数据隐私和安全性,很多人都无法放心将所有笔记保存在 Notion、Wolai 这类纯在线服务上,一旦服务变卦 (比如收费、倒闭等) 都会很被动。所以,如果有一款既拥有各种先进特性,还能自建服务器的开源笔记软件,那就非常完美了!而它就是思源笔记以下是思源笔记官网的介绍,着实让人心动:部署官网提供 Docker 方式,让私有化部署便捷了不少。只需要两条命令即可:# 拉取镜像 docker pull b3log/siyuan # docker 运行 docker run --name siyuan -it -d --restart=always -v /data/siyuan/workspace:/siyuan/workspace -p 6806:6806 -u $(id -u):$(id -g) b3log/siyuan --workspace=/siyuan/workspace配置 nginx 对外提供服务我使用的腾讯云的服务器,将思源笔记使用docker 运行后,通常使用 nginx 代理对外提供应用服务。nginx 代理配置信息如下server { listen 80; server_name siyuannote.dev.wljy.xyz; index index.html index.htm default.htm default.html; root /www/wwwroot/siyuannote.dev.wljy.xyz; location / { proxy_pass http://10.0.12.15:6806; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; add_header X-Cache $upstream_cache_status; #Set Nginx Cache add_header Cache-Control no-cache; } access_log /www/wwwlogs/siyuannote.dev.wljy.xyz.log; error_log /www/wwwlogs/siyuannote.dev.wljy.xyz.error.log; }配制好后,重启 nginx 服务即可使用我们nginx配置的域名(siyuannote.dev.wljy.xyz)访问了。初体验国际化初次访问的时候,默认是英文版的,可以按Alt + P,在打开的对话框中,选择 Appearance -> Language 中选择 简体中文:使用体验Block编辑思源笔记在使用体验上,较常规markdown编辑器,一大特色就是Block编辑模式,按下 /后可快速使用内置 20+ 种类型的块元素和 10+ 种行级元素。表格排版对于一些结构化的数据,难免会使用表格进行布局,而常规的markdown 在使用表格时异常难使用,思源笔记提供右键方式操作表格,也还算灵活:粘贴Markdown初次使用的时候,直接把 markdown 内容在编辑器中Ctrl + V 粘贴,发现直接变成代码块了。感觉有些不习惯,这一点语雀做得最好。在快捷键中查看了下 粘贴为纯文本方式 ,可以使用 Ctrl + Shift + V。从快捷键配置界面可以看出思源笔记的快捷键还是很丰富的,而且可以自定义。粘贴剪贴板中的图片经验证可直接粘贴剪贴板中的截图图片上传到服务器中,图片上传后持久化存储在服务器思源笔记工作目录的assets目录中。没有看到可以配置图床的地方。安全配置思源笔记部署后默认是不需要密码即可访问的,我们私有化部署更多的是要控制只有我们自己能访问。可在配置界面的 关于 -> 访问授权码 中 设置授权码:配置后将只能输入授权码解锁后才可访问:功能扩展思源笔记提供「集市」模块,可在线下载主题、模板、图表、挂件,初步使用感觉还是蛮方便的。尾声Typora 开启强制收费模式后,有短暂的使用过Mark Text,但是发现Mark Text 在打开较大 markdown 文件时比较卡顿。偶然在公众号中看到推荐的思源笔记,通过官网了解后,便有了试用的冲动。使用下来,感觉可以作为后续的主markdown编辑器使用。Links官网:https://b3log.org/siyuan/思源笔记Docker镜像:https://hub.docker.com/r/b3log/siyuan
2022年09月15日
1,193 阅读
0 评论
0 点赞
2022-08-06
Keyviz – 开源按键可视化工具:实时显示键盘按键[Windows]
介绍Keyviz 是一款开源、免费的按键可视化工具,它可以实时显示用户当前按下的按键,可自定义显示按键风格、样式,非常适合录屏、演示等场合使用。其可定制性让你能制作出任意风格的按键风格:使用很简单,在设置界面的 Style 里选中一个喜欢的、独特的键盘样式以及位置,对于很多截图、录屏、直播用户,甚至可以作为个人标识使用:还可以设置显示全部按键,或者仅显示快捷键,比如 Ctrl + C,但不显示 Shift + 1、A、B、C 等按键。最重要的是宣传图做的好看,那么用户将来截图录屏也会很漂亮。链接官网:https://kutt.appinn.net/UPg2QUGithub:https://github.com/mulaRahul/keyviz
2022年08月06日
102 阅读
0 评论
0 点赞
2017-06-28
Git常用命令
前言Git,是一个开源的分布式版本控制系统,用以有效、高速的处理从很小到非常大的项目版本管理。支持克隆/下载。Git教程: Git Book 官方中文文档Git GUI客户端: TortoiseGit(Windows)Git常用命令仓库# 在当前目录新建一个Git代码库 $ git init # 新建一个目录,将其初始化为Git代码库 $ git init [project-name] # 下载一个项目和它的整个代码历史 $ git clone [url]配置# 显示当前的Git配置 $ git config --list # 编辑Git配置文件 $ git config -e [--global] # 设置提交代码时的用户信息 $ git config [--global] user.name "[name]" $ git config [--global] user.email "[email address]"增加/删除文件# 添加指定文件到暂存区 $ git add [file1] [file2] ... # 添加指定目录到暂存区,包括子目录 $ git add [dir] # 添加当前目录的所有文件到暂存区 $ git add . # 添加每个变化前,都会要求确认 # 对于同一个文件的多处变化,可以实现分次提交 $ git add -p # 删除工作区文件,并且将这次删除放入暂存区 $ git rm [file1] [file2] ... # 停止追踪指定文件,但该文件会保留在工作区 $ git rm --cached [file] # 改名文件,并且将这个改名放入暂存区 $ git mv [file-original] [file-renamed]代码提交# 提交暂存区到仓库区 $ git commit -m [message] # 提交暂存区的指定文件到仓库区 $ git commit [file1] [file2] ... -m [message] # 提交工作区自上次commit之后的变化,直接到仓库区 $ git commit -a # 提交时显示所有diff信息 $ git commit -v # 使用一次新的commit,替代上一次提交 # 如果代码没有任何新变化,则用来改写上一次commit的提交信息 $ git commit --amend -m [message] # 重做上一次commit,并包括指定文件的新变化 $ git commit --amend [file1] [file2] ...分支# 列出所有本地分支 $ git branch # 列出所有远程分支 $ git branch -r # 列出所有本地分支和远程分支 $ git branch -a # 新建一个分支,但依然停留在当前分支 $ git branch [branch-name] # 新建一个分支,并切换到该分支 $ git checkout -b [branch] # 新建一个分支,指向指定commit $ git branch [branch] [commit] # 新建一个分支,与指定的远程分支建立追踪关系 $ git branch --track [branch] [remote-branch] # 切换到指定分支,并更新工作区 $ git checkout [branch-name] # 切换到上一个分支 $ git checkout - # 建立追踪关系,在现有分支与指定的远程分支之间 $ git branch --set-upstream [branch] [remote-branch] # 合并指定分支到当前分支 $ git merge [branch] # 选择一个commit,合并进当前分支 $ git cherry-pick [commit] # 删除分支 $ git branch -d [branch-name] # 删除远程分支 $ git push origin --delete [branch-name] $ git branch -dr [remote/branch]标签# 列出所有tag $ git tag # 新建一个tag在当前commit $ git tag [tag] # 新建一个tag在指定commit $ git tag [tag] [commit] # 删除本地tag $ git tag -d [tag] # 删除远程tag $ git push origin :refs/tags/[tagName] # 查看tag信息 $ git show [tag] # 提交指定tag $ git push [remote] [tag] # 提交所有tag $ git push [remote] --tags # 新建一个分支,指向某个tag $ git checkout -b [branch] [tag]查看信息# 显示有变更的文件 $ git status # 显示当前分支的版本历史 $ git log # 显示commit历史,以及每次commit发生变更的文件 $ git log --stat # 搜索提交历史,根据关键词 $ git log -S [keyword] # 显示某个commit之后的所有变动,每个commit占据一行 $ git log [tag] HEAD --pretty=format:%s # 显示某个commit之后的所有变动,其"提交说明"必须符合搜索条件 $ git log [tag] HEAD --grep feature # 显示某个文件的版本历史,包括文件改名 $ git log --follow [file] $ git whatchanged [file] # 显示指定文件相关的每一次diff $ git log -p [file] # 显示过去5次提交 $ git log -5 --pretty --oneline # 显示所有提交过的用户,按提交次数排序 $ git shortlog -sn # 显示指定文件是什么人在什么时间修改过 $ git blame [file] # 显示暂存区和工作区的差异 $ git diff # 显示暂存区和上一个commit的差异 $ git diff --cached [file] # 显示工作区与当前分支最新commit之间的差异 $ git diff HEAD # 显示两次提交之间的差异 $ git diff [first-branch]...[second-branch] # 显示今天你写了多少行代码 $ git diff --shortstat "@{0 day ago}" # 显示某次提交的元数据和内容变化 $ git show [commit] # 显示某次提交发生变化的文件 $ git show --name-only [commit] # 显示某次提交时,某个文件的内容 $ git show [commit]:[filename] # 显示当前分支的最近几次提交 $ git reflog远程同步# 下载远程仓库的所有变动 $ git fetch [remote] # 显示所有远程仓库 $ git remote -v # 显示某个远程仓库的信息 $ git remote show [remote] # 增加一个新的远程仓库,并命名 $ git remote add [shortname] [url] # 取回远程仓库的变化,并与本地分支合并 $ git pull [remote] [branch] # 上传本地指定分支到远程仓库 $ git push [remote] [branch] # 强行推送当前分支到远程仓库,即使有冲突 $ git push [remote] --force # 推送所有分支到远程仓库 $ git push [remote] --all撤销# 恢复暂存区的指定文件到工作区 $ git checkout [file] # 恢复某个commit的指定文件到暂存区和工作区 $ git checkout [commit] [file] # 恢复暂存区的所有文件到工作区 $ git checkout . # 重置暂存区的指定文件,与上一次commit保持一致,但工作区不变 $ git reset [file] # 重置暂存区与工作区,与上一次commit保持一致 $ git reset --hard # 重置当前分支的指针为指定commit,同时重置暂存区,但工作区不变 $ git reset [commit] # 重置当前分支的HEAD为指定commit,同时重置暂存区和工作区,与指定commit一致 $ git reset --hard [commit] # 重置当前HEAD为指定commit,但保持暂存区和工作区不变 $ git reset --keep [commit] # 新建一个commit,用来撤销指定commit # 后者的所有变化都将被前者抵消,并且应用到当前分支 $ git revert [commit] # 暂时将未提交的变化移除,稍后再移入 $ git stash $ git stash pop其他# 生成一个可供发布的压缩包 $ git archive
2017年06月28日
11 阅读
0 评论
0 点赞