Cobrautils: 让绑定参数更简单

Cobrautils: 让绑定参数更简单 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/03/29/cobrautils-bind-parameters/ 有群友说, python 命令行绑定参数方便。 本来没什么 还要顺口踩一脚 go 的参数绑定不方便。 这个能忍? CobraUtils 使用结构体绑定参数 cobra 绝对是命令行库中的第一梯队, kubectl 也是使用这个库实现的。 现在的问题是: 怎么才能 快速方便 的绑定参数呢? 那就必须用 反射 实……

阅读全文

K8s API 依赖导入链的版本问题

K8s API 依赖导入链的版本问题 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/03/25/k8s-api-import-chain-problem/ 1 2 3 4 5 6 7 8 // go.mod // 异常的版本依赖指定和引用 require ( k8s.io/api v0.28.8 k8s.io/client-go v0.28.8 k8s.io/apimachinery v0.28.8 ) 由于依赖链的中的版本问题, 导致 k8s.io 被默认指向了当前最新版本 v0.29.3。 但是出现了一点点小问题, 导致 go mod tidy 失败。 go: github.com/example/kubez/pkg/healthy imports k8s.io/client-go/kubernetes imports k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1 imports k8s.io/api/auditregistration/v1alpha1: module k8s.io/api@latest found (v0.29.3), but does not contain package k8s.io/api/auditregistration/v1alpha1 go:……

阅读全文

Cors Rules

CORS 跨域规则 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/03/19/cors-rules/ 1. 因为 axios 封装遇到的跨域问题 本地服务器: http://127.0.0.1:5173, 后端服务器 http://127.0.0.1:8888。 服务器程序为 json-server。 进行如下封装后, 出现跨域问题, 尝试搜索 json-server 允许跨域配置, 始终无果。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17……

阅读全文

Technique English

Technique English 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/03/05/technique-english/ integrity check 完整性检查……

阅读全文

Karabiner Keyboard Assistant

Karabiner Keyboard Assistant 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/03/05/karabiner-keyboard-assistant/ 下载地址 karabiner 是一款 mac 系统下 免费 的键位修改器。 https://karabiner-elements.pqrs.org/ 自定义配置 配置文件目录: ~/.config/karabiner/assets/complex_modifications/ ctrl + hjkl 的 vim 风格移动键位 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70……

阅读全文

Json Server Not Found

Json Server Not Found 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/02/26/json-server-not-found/ 使用 本地安装 安装 json-server, 启动时出现 json-server not found 的错误。 1 $ npm install json-server 这时, 需要使用 npx 命令启动 1 $ npx json-server --watch data.json --port 3101 如果想要直接使用 json-server 的话, 需要执行 全局安装 1 2 3 $ npm install json-server -g # or $ npm install json-server --save-dev 之后就可以直接安装了。 1 $ json-server --watch data.json --port 3101……

阅读全文

PromQL 从入门到精通(电子书)

PromQL 从入门到精通(电子书) 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/02/26/promql-learning-book/ 群友分享。 下载地址: PromQL 从入门到精通.pdf……

阅读全文

一个关于 Nodejs Dockerfile 的小优化

一个关于 Nodejs Dockerfile 的小优化 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/02/20/a-simple-optimizion-for-nodejs-dockerfile/ 原版 Dockerfile 如下。 1 2 3 4 5 6 7 8 9 10 FROM ${BASE_IMAGE} as env RUN mkdir -p /app && chown -R node:node /app WORKDIR /app COPY package*.json ./ COPY .npmrc ./ USER node ## 问题在这里, npm install 失败之后, 无法看到具体错误 RUN npm install 在执行完成 npm install 之后没有更多的 错误判断。 如果没有出错, 一切都正常。 往下走就行了。 但是执行出错……

阅读全文

通过 URL link 填写 JIRA 表单内容

通过 URL link 填写 JIRA 表单内容 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/02/19/fill-jira-ticket-fields-by-url-link/ 假如有一张 JIRA 表单, 内容格式有规律可循。 这个时候,你可以 可以通过 URL 携带 Query 参数, 在创建表单的时候填写上默认值。 抓一下 JIRA 的请求接口, 直接调用 API。 1. URL 携带 Query 参数 创建表单的时候随便填写一点东西。 打开 Chrome 控制台, 清空所有 Netowrk 信息……

阅读全文

Containerd Bug Cve 2024 21626

K8S/ContaienrD 高危文件描述符漏洞 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/02/02/containerd-bug-cve-2024-21626/ 漏洞根源 2024年2月1日, runc 爆出 高危 文件描述符 漏洞。 漏洞编号: CVE-2024-21626 影响范围: 1.0.0-rc93 <= runc <= 1.1.11 安全版本: runc 1.1.12 ContainerD 受影响范围 ContainerD 受到影响。 版本覆盖 v1.5.13 - 1.6.20 使用命令查看 containerd 版本 1 2 $ containerd --version containerd containerd.io 1.6.22 8165feabfdfe38c65b599c4993d227328c231fca 修复方式 将 containerd 升级到 1.16.20 以上版本即可。 从 ContainerD 官网 下……

阅读全文

福利派送

  • (免费星球)「运维成长路线」

  • 又拍云免费 CDN

最近文章

分类

标签

其它