围程

编程是一座城,城内的人想出去,城外的人想进来。

-- 围程

对vue项目添加i18n支持

## 安装i18相关依赖 开始安装 ```shell pnpm add i18next i18next-vue i18next-browser-languagedetector ``` 建立i18n文件 ```ts import i18next from 'i18next' import I18NextVue from 'i18next-vue' import LanguageDetector from 'i18next-browser-languagedetector' import {App...

更新时间:2024-05-25 19:46:56 阅读:20 所属栏目: 日志

用UnoCSS加载iconify图标

## 首先加载一个unocss *用`pnpm`安装`unocss`* ```shell pnpm add -D unocss ``` *配置`vite.config.ts`* ```ts import UnoCSS from 'unocss/vite' import { defineConfig } from 'vite' export default defineConfig({ plugins: [ UnoCSS(), ], }) ``` ## 配置unocss *安...

更新时间:2024-06-13 18:06:59 阅读:54 所属栏目: 日志

vs build tools 各版本地址

**传送门** [vs build tools 2022](https://aka.ms/vs/17/release/vs_BuildTools.exe) [vs build tools 2019](https://aka.ms/vs/16/release/vs_BuildTools.exe) [vs build tools 2017](https://aka.ms/vs/15/release/vs_BuildTools.exe)

更新时间:2024-04-17 12:01:48 阅读:40 所属栏目: 日志

Redis 集群创建

**官方有比较详细的例子了这里发个直通车** [这里右键点击新标签页打开官方教程](https://redis.io/docs/latest/operate/oss_and_stack/management/scaling/#create-and-use-a-redis-cluster) **配置文件** ```ini port 7005 requirepass pwd_123456 masterauth pwd_12345 cluster-enabled yes cluster-config-...

更新时间:2024-04-15 15:25:07 阅读:33 所属栏目: 日志

web中使用protobuf

## 安装环境 1. 到github去下载protoc编译好的二进制文件 -> [https://github.com/protocolbuffers/protobuf/releases](https://github.com/protocolbuffers/protobuf/releases) 选择对应平台的下载(放入path环境中) 2. 安装生成js文件的插件 `npm i -g protoc-gen-js` (建议全局安装) 3. 安装 browserify `npm i -g browse...

更新时间:2024-03-19 16:36:07 阅读:47 所属栏目: 日志

Docker 部署 RocketMQ 5.x

Apache RocketMQ 是一个分布式消息中间件系统,用于实现高可用、高性能的消息传递。 ## 1、创建RocketMQ容器共享网络 RocketMQ有多个服务,需要分别创建容器,并且需要互相通信。 ```shell docker network create rocketmq # docker network ls #列出已有docker网络 # docker network inspect rocketmq #查看网络信息 ``` ## 2、部署RocketMQ NameServer ...

更新时间:2023-12-30 16:19:19 阅读:136 所属栏目: 日志

rocky linux升级使用gcc新版本

**1.安装gcc toolset** ```shell dnf -y install gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ ``` **2.安装完后重新加载profile让gcc版本生效** ```shell . /opt/rh/gcc-toolset-12/enable ``` **3.查看版本** ```shell gcc --version g++ --version ```

更新时间:2023-12-25 15:41:43 阅读:149 所属栏目: 日志

编写一个systemctl服务的配置文件

> 在 Linux 系统下,使用 systemd 可以方便地控制服务的启动、停止、配置后台运行以及开机自启动。 *以下是具体的操作步骤:* ## 1. 安装 systemd > 如果您的 Linux 服务器上尚未安装 systemd,可以使用包管理器如 yum(适用于 CentOS/RHEL)或 apt(适用于 Debian/Ubuntu)来安装它 ```shell # 使用 yum 安装 systemd(CentOS/RHEL/RockyLinux) yum install systemd ...

更新时间:2023-11-24 18:02:38 阅读:61 所属栏目: 日志

golang Gin定制自定义Context

>每次使用gin时返回json都需要handler里面用context.JSON()返回,异常的麻烦。 > >这里封装一下工具方法直接调用ctx.Ok(data)这样的方式返回 ## 定义一个Context ```go type Context struct { *gin.Context } ``` ## 添加方法 ```go // UnAuthorization 未授权 func (c Context) UnAuthorization() { d := Body{ Code: cod...

更新时间:2023-11-20 12:00:34 阅读:104 所属栏目: 日志

nodejs使用ts

> nodejs使用ts ## 一、初始化项目 ```shell mkdir ts-demo && cd ts-demo && npm init ``` ## 二、安装必要包 ```shell npm i -D typescript @types/node nodemon ts-node ```` ## 三、添加tsconfig.json配置文件 > 也可以用 `npx tsc --init` 命令直接生成一个默认的tsconfig.json > > 也可以如下自己建立一个 ```j...

更新时间:2023-08-22 09:46:21 阅读:112 所属栏目: 日志
共3页 当前第1页
前往