Hi there 👋

Welcome to my blog

GORM增加sqlcommenter特性

什么是sqlcommenter? sqlcommenter is a suite of middlewares/plugins that enable your ORMs to augment SQL statements before execution, with comments containing information about the code that caused its execution. This helps in easily correlating slow performance with source code and giving insights into backend database performance. In short it provides some observability into the state of...

2024-04-18 · 2 min · 742 words · Liudon

源码分析:GORM是如何生成sql的

在gorm下实现sqlcommenter过程中,遇到一些问题,顺便把gorm整个流程梳理了一遍,整理记录一下。 gorm使用示例 package main import ( "gorm.io/driver/mysql" "gorm.io/gorm" )...

2024-04-18 · 6 min · 2737 words · Liudon

工银亚洲网银密码重置

18年的时候办了张工银亚洲的银行卡,好几年没有用过了。 今年想起来了,发现网银登不上了,密码忘了。 最悲剧的是,试了超过10次,账户冻结了。 打9...

2024-03-16 · 1 min · 481 words · Liudon

加速Cloudflare访问

背景 这是当前的博客架构,文件保存在Github仓库,通过Cloudflare Page提供访问。 众所周知,在国内,Cloudflare的CDN...

2024-02-21 · 3 min · 1128 words · Liudon

2023年终总结

2023年过完了,是时候来个总结了。 博客 2023年一共更新了15篇内容,共计12000字。 访问Top3的文章: 将博客部署到星际文件系统(IP...

2024-01-04 · 2 min · 748 words · Liudon

2023年12月北京暴雪记录

记录暴雪下普通打工人的生活。 12月14日 周四 北京的雪已经连着下了两天了。 12月11日,也是因为下雪,晚上打车打到10点半才叫到车。 所以这次下...

2023-12-16 · 2 min · 599 words · Liudon

使用Hugo实现响应式和优化的图片

继续我们的博客优化之旅,本篇内容我们将介绍如何使用Hugo实现响应式和优化的图片。 问题 在之前文章里,通过腾讯云数据万象实现了图片优化能力,具...

2023-12-10 · 5 min · 2021 words · Liudon

加速Google Analytics

起因 Google Analytics是一款优秀的流量分析服务,集成方便,使用简单。 最近在优化页面访问速度,发现Google Analytics是一个优化点...

2023-12-02 · 2 min · 870 words · Liudon

使用Google Indexing API加速博客收录

对于一个新站点来说,总是想着能让搜索引擎快点收录网站内容。 今天,我们就来介绍一种利用Google Indexing API接口,通过Github Actions...

2023-10-27 · 2 min · 635 words · Liudon

在Netlify上部署Twikoo评论系统

在本篇文章里,我会介绍如何在Netlify上部署Twikoo评论系统,如何接入到静态博客Hugo,以及如何实现Twikoo系统版本自动更新。...

2023-10-19 · 5 min · 2117 words · Liudon

利用Github Actions定时抓取微博

背景 在微博上关注了一些用户,比如tk教主,月风。 但是有些内容过段时间不可见了,所以希望可以定时抓取微博归档备份下来。 实现方案 整体思路:利用G...

2023-10-07 · 2 min · 823 words · Liudon

北大口腔牙周刮治记录

病情 上次洗完牙后,还是不时有出血的情况。 前段时间更是出现牙龈劈开一块肉,特别容易塞东西的情况。 于是,又跑到医院来看牙了。 医生检查后,说是牙周...

2023-09-17 · 2 min · 716 words · Liudon

故乡回忆之旅

赶在8月底,趁着娃暑假的尾声,回了趟老家。 老家有条俗语,“永福庄的街,三里长”。 这天吃完午饭,临时起意,带媳妇溜溜大街,见识下我们的大街。 小...

2023-09-09 · 1 min · 292 words · Liudon

解决Golang使用go get安装包后找不到可执行文件的问题

背景 编译流水线代码 go get google.golang.org/protobuf/cmd/protoc-gen-go@latest protoc -I=./zzz --proto_path=./xx --go_out=./abc --go_opt=paths=xx.proto ... go build -o xxx 在go升级到1.20.1版本后,执行报错。 protoc-gen-go: program not found or is not executable 解决 Starting in Go 1.17, installing executables with go get is deprecated. go install may be used instead....

2023-08-17 · 1 min · 195 words · Liudon

修正Hugo的JSON Feed格式

问题背景 前几天在Planet里follow自己的web3博客,遇到下面的错误。 经过Livid大佬提醒,说是网站的JSON Feed不是标准格式...

2023-03-25 · 3 min · 1419 words · Liudon

我的学车之路

之前在2022年终总结提到过,我在练车考驾照。 就在昨天,终于拿证了。👏👏👏 咱也是可以上路开车的人了,虽然比别人晚了快10年才拿证。🐶 2022...

2023-03-24 · 1 min · 375 words · Liudon
将博客部署到星际文件系统(IPFS)

将博客部署到星际文件系统(IPFS)

将博客部署到星际文件系统(IPFS)

在这篇文章,我将会介绍如何利用Github Actions将hugo博客自动部署到IPFS上,并通过自定义域名访问IPFS上的文件。 IPFS(...

2023-02-21 · 3 min · 1326 words · Liudon

新冠疫情后的第一个春节

下面的内容是由chatGPT润色生成的。 AI太强大了 😂 当我还是个孩子的时候,在看春节晚会时,总会有节目介绍那些不能回家过年的人。 但我从未想过...

2023-02-16 · 1 min · 242 words · Liudon

第一次清理键盘

19年生日的时候,媳妇送了一款flico的机械键盘。 这次搬家后,想着年前清理下键盘,实在是太脏了。 周五下班,带上键盘回家。 键盘全貌,上面好多...

2023-01-16 · 1 min · 141 words · Liudon

2022年终总结

2022年已经过去1周多了,记录一下我的2022年。 疫情 2022年,是新冠疫情的第三年,也是切身感受到的一年。 3月22日晚,8点半和同事刚上...

2023-01-12 · 2 min · 646 words · Liudon