How to fix no network issue in lintmint

Today, when I opened my laptop, I found that I could not open google. It’s so weird! And I found no networking connection that time, here is how I fix this issue to keep my work going on. Env: OS: LinMint 21.1 Cinnamon VM: virtual machine V17 Network mode: NAT First of all, I checked whether the network enabled or not. sudo cat /var/lib/NetworkManager/NetworkManager.state And the result is: [main] NetworkingEnabled=false WirelessEnabled=true WWANEnabled=true The NetworkingEnabled is false, this is why my lintmint has no network....

December 5, 2023 · 1 min · wuqiangroy

Fix the installation block on Ubuntu

This is a very short post to record me how to fix the installation block on Ubuntu. Accurately say, it’s not Ubunut, it’s lintmint but based on Ubuntu, so the commands are also suit for Ubuntu. When I installed a .deb package and failed (The command: sudo dpkg -i ./<package_name>.deb). Followed the warning message, I use apt install --fix-broken but fixed failed. So I know I needed to delete this software....

September 13, 2023 · 1 min · wuqiangroy

The Unit Test Case Guideline Of Golang Gin

At this post, I have brief introduced how to test our gin APIs. And one test case tests one API, maybe this API including thousands functions, this kind of test we allways call Integration Test. The Integration Test always care whether the API works well or not, it does’t care the codes coverage and whether a certain function works as expect or not. So, we need to write Unit Test to ensure our program robust and keeps the issues number at a very low level....

August 24, 2023 · 10 min · wuqiangroy

Travel to ShaoHai Park in CNY

This new year was the coldest in Qingdao since I first went here in 2016. The coldest day is -16 degrees celsius, and I can only spend all the time inside the room. To my disappointment, I thought it would be snow stack and no. Before I left, the cold air left then sunlight made the ground warm, the highest weather was 8 degrees celsius, so I decided to leave the cozy room and travel to the well-known park in JiaoZhou: ShaoHai Park....

February 2, 2023 · 2 min · wuqiangroy

How to enable remote access for Docker

When we install Docker and run it, the remote access is disabled in the default configuration. Sometimes we need the remote access. Actually the Docker official provides how to enable it for us but it’s useless for me because I can not modify&save the docker.service file when I follow the tutorial. If you have interests, please see: Configure remote access for Docker daemon So this is why I write this short post to record a solution to enable the remote access, in case I forget it in the future....

January 13, 2023 · 3 min · wuqiangroy

How to test the APIs of your Go-Gin service?

As the pre-post said, Gin is a famouse web framework writen by Go. I love it and always use it. When I wrote a web server using Go-Gin, how do I test the APIs? This may confused me, only use a command-line tool to verify them? It’s seems ridiculous and non-product. We need to have a full-check for the APIs and it’s better to make it automatic, then we need to integrate it in the CI-CD pipline, make sure that it will run automaticly after we commit codes....

January 3, 2023 · 5 min · wuqiangroy

How to set a Go project as a Go module?

When we create an aswsome project written by Go, we always want to provide it for others. Some good projects like gorilla websocket, gorm and gin, we can easily to run go get github.com/xxx to get the Go module and then use it in our projects. So, how can we build our own Go project as a Go module? Github In the platform of Github, you may want to build your projects for all the users so they can use your project directly....

January 1, 2023 · 3 min · wuqiangroy

Integrate websocket to gin

Introduction Gin is a famous web framework written in Go, we can easy to build our web server by following codes: 1 2 3 4 5 6 7 8 9 10 11 12 package main import "github.com/gin-gonic/gin" func main() { r := gin.Default() r.GET("/hello-world", func(c *gin.Context) { c.JSON(200, gin.H{ "message": "hello, world", }) }) r.Run() // listen and serve on 0.0.0.0:8080 } Saving these 11 lines codes as a hello.go file, then run go run hello....

December 16, 2022 · 5 min · wuqiangroy

我大抵是阳了

上周六(12-10)一早起床,我发现我的嗓子有点干痒,妻直接是感冒症状了,据她说是前一天穿衣午睡,然后起床没加衣服导致的。 晚上的时候,妻病情加重,开始发烧,我这边还好,怕波及小孩子,我妈赶紧过来将小孩接走。 当晚,妻多次发烧,难以入睡,喝了布洛芬悬浊液之后勉强入睡。 我这边一切正常。 12-11 周日 周日一起床,我发现我这边比较严重了,开始头晕,但是这时候晕的不是特别厉害,只是很轻微。 下午完了一会原神,但是玩不进去,于是我选择上床躺着休息。 躺着的时候还是很舒服的,但是一起床,头晕目眩的感觉很难受,特别是眼睛胀痛,在往上看的时候尤其严重。 四肢酸软。 其实这个时候我都还在纠结我是不是得了新冠,也不愿去做检测(检测排队太久了)。我感觉我可能是感冒。 于是我决定做点家务,再把地拖了之后,又烧了点艾草水泡澡。 泡完澡半小时之后,我出现了发热,最高到了 39.1 度。 这时候我精神还很好,但是已经开始出现了不想动的情况,妻赶紧给我喝布洛芬悬浊液,效果很好,几分钟就感觉体温降了下去,然后一切均恢复正常。 也许是发烧的时候人体感知时间不久,我当时感觉发烧持续了半小时左右。 12-12 周一 今日起床,无任何发烧情况了,但是头晕目涨的情况依旧。 四肢酸软的情况消失。 晚上躺在沙发上看县委大院和三体,这时候感觉和正常人无异,但是一起身,头晕的感觉就会袭来,这种头晕的感觉和人下蹲久了突然起身导致的头晕感觉一致。 今天开始出现鼻塞的现象,但是擤不出鼻涕。 晚上入睡轻松,侧躺鼻塞现象消失,夜里浑身出汗多次。 12-13 周二 今日起床,头晕目涨感觉轻微。嗓子出现干痒,白天少咳。 晚上咳嗽多次,多是干咳,咳嗽引起嗓子疼痛。 鼻塞较前一天加重,能擤出少量鼻涕,但是对鼻塞没有缓解作用,侧躺鼻塞不能完全消失,能减轻症状。 入睡轻松。 12-14 周三 今天头晕目涨的感觉全部消失,咳嗽减轻,每咳必出脓痰。嗓子疼痛感较前一天减弱很多。 味觉出现减弱现象,不知道是不是因为鼻塞的原因。 鼻塞减弱,有鼻涕流出,和平时感冒症状一致。 根据网上流传的奥密克戎症状图来看,我应该就是阳性了。 而且我感觉,新冠比感冒来的更猛更迅速。 我也不禁感叹,国家保护了我三年,我屁事没有,现在自己保护自己,才几天,就阳了。 我爸、我妈同时感觉嗓子痒,大抵也阳了。 我们趁着病情好转,将小孩接了回来。

December 14, 2022 · 1 min · wuqiangroy

十里长街送长者!

December 1, 2022 · 0 min · wuqiangroy