Install Go Tools After Upgrade Macos

Install Go Tools After Upgrade Macos 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2023/09/18/install-go-tools-after-upgrade-macos/ 升级 mac 到最新后, 所有工具都不可用了。 使用 go install 命令重新安装时,报错如下 1 2 3 4 $ go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest runtime/cgo # runtime/cgo xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun 重新安装 xcode, 运行如下命令, 一路点击 确认/安装 即可 1 $ xcode-select --install xcode 安装完成, 重新执行 go install 安装工具。……

阅读全文

英语: 不规则动词

英语: 不规则从此分类 原文链接: https://www.yingyutu.com/ 过去式 = 过去分词 = 原形 原形 过去式 过去分词 汉语意思 bet bet bet 打赌 cost cost cost 耗费(钱) cut cut cut 切、割 hit hit hit 击打、撞 hurt hurt hurt 使…伤痛 let let let 让 put put put 放 read read read 读 set set set 安排、安置 set set set 安排、安置 过去式改字母, 过去分词 = 原形 原形 过去式 过去分词 汉语意思 become became becom 成为 come came come 来 run ran run……

阅读全文

Dockerfile: RUN 命令支持内置Shell脚本, 从此告别 && 链接符号

Dockerfile: RUN 命令支持内置Shell脚本, 从此告别 && 链接符号 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2023/09/03/dockerfile-buildkit-here-syntax-wonderful/ 前几天, 我测试 Dockerfile 的 Here-Doc 语法 , 说其是 鸡肋语法, 是我 浅薄 了。 重新看了 docker 官网文档关于 buildkit 的介绍, 从 docker engine 23.0 开始就是默认 builder 了。 BuildKitopen_in_new is an improved backend to replace the legacy builder. BuildKit is the default builder for users on Docker Desktop, and Docker Engine as of version 23.0. 换句话说, 我们上一篇文……

阅读全文

Dockerfile: 通过 buildkit 支持多行语法

Dockerfile: 通过 buildkit 支持多行语法 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2023/09/01/dockerfile-buildkit-here-syntax/ 今天在看 docker 文档的时候, 发现了一个新语法 Dockerfile - here documents 语法 , 即 多行语法。 在 Dockerfile 1.4 中添加。 如果你知道 cat 的 here document 语法, 就会很好理解。 1 2 3 4 cat > demo.txt <<EOF > 123 > asdb > EOF 该语法在使用时有一些限制条件 该语法只支持在 RUN 和 COPY 下使用。 需要通过 buildkit 解析语法……

阅读全文

Aliyun: 通过 API 配置 CDN

Aliyun Cdn Api Setting 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2023/08/30/aliyun-cdn-api-setting/ 参考文档 Aliyun CDN 在线 API Online: https://api.aliyun.com/api/Cdn/2018-05-10/BatchSetCdnDomainConfig Aliyun CDN Document 域名配置功能函数: https://help.aliyun.com/zh/cdn/developer-reference/parameters-for-configuring-features-for-domain-names Aliyun CDN SDK: https://github.com/alibabacloud-go/cdn-20180510……

阅读全文

Opentelmetry(2): 【内部分享】 从入门到精通

Opentelmetry(2): 【内部分享】 从入门到精通 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2023/08/29/opentelmetry-introduce-techsharing/ 01. 我们为什么需要做链路追踪 当 服务逻辑复杂、 调用链条过长 , 甚至夸多个部门协作时。 一个请求 从被接受到应答 中间过程就是个 黑盒, 如果出现不稳定的情况, 例如 响应慢, 相应错误 的时候, 排查起来效率低下, 甚至无法排查。 如果想要解……

阅读全文

Nginx: 最常见的 2 中 http to https 跳转场景

Nginx: 最常见的 2 中 http to https 跳转场景 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2023/08/28/nginx-http-https-redirect-scenarios/ 1. Nginx 上层无代理, 用户直接访问 这种方式比较简单。 我们对 http 和 https 都具有控权。 用户是直接访问 Nginx 服务器。 所以可以直接通过在 http server 上配置到 301 跳转 到 https 服务器即可。 # http server server { listen 80; server_name _; return 301 https://$host$request_uri; } # https server server { listen 443 ssl http2; server_name www.example.com; # ... other } 通常, 我……

阅读全文

使用 Aliyun Cli 更新 CDN HTTPS 证书

使用 Aliyun Cli 更新 CDN HTTPS 证书 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2023/08/22/aliyun-cli-update-cdn-https-certificate/ Aliyun API 文档 SetDomainServerCertificate - 设置域名证书 使用 aliyun cli 命令行 1 2 3 4 5 6 $ aliyun --profile my-profile \ cdn SetDomainServerCertificate \ --DomainName YOUR_CDN_DOMAIN \ --CertName Your_UPLOADED_CERT_FILE_NAME \ --CertType upload \ --ServerCertificateStatus on……

阅读全文

使用 STS 登陆 Aliyun 命令行

使用 STS 登陆 Aliyun 命令行 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2023/08/22/aliyun-sso-login-and-configure/ 使用 acs-sso 登陆, 获取 sts token 1 $ acs-sso login --profile my-profile 配置 aliyun configure, aliyun cli 非交互式登陆 1 2 3 4 5 6 7 $ aliyun configure set \ --profile my-profile \ --mode StsToken \ --region cn-hangzhou \ --access-key-id AccessKeyId \ --access-key-secret AccessKeySecret \ --sts-token StsToken 使用 aliyun --profile my-profile XXXX 执行命令 2. 使用 jq 提取字段, 完成自动登陆 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 #!/bin/bash……

阅读全文

OpenTelemetry(1): Golang 接入 OpenTelemetry 完整过程和思路(附源码)- Gin Demo

Golang 接入 OpenTelemetry 完整过程和思路(附源码) - Gin Demo 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2023/08/14/golang-opentelemetry-notes/ 为了更方便的查看代码, 建议直接跳转到 Github 仓库: https://github.com/tangx/opentelemetry-gin-demo 使用笔记 1. 使用 Otel-Collect-Contrib 初始化 trace.Provider 这里使用 app -> collector-contrib 进行转发, 应用不直接对后端的存储。 适配性 更高。 collector-contrib 最常见的两种协议 grpc / http(s)。 传入 endpoint 地址进行初始化 Provid……

阅读全文

福利派送

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

  • 又拍云免费 CDN

最近文章

分类

标签

其它