cmake
Cmake
k8s以及云原生
我已经将我云原生的那个库删掉,并入了我的blog里。 云原生我去年开始正式投入接触云原生的学习,到如今也接触了有一年的时间了。以前不理解这玩意有什么特别的,尤其是之前没有接触过大企业中的软件。自己的小软件,或者干脆就是跑几行代码,在bare metal上部署,性能、软硬件结合以及方便程度都要高于使用容器,甚至虚拟机都要更方便。但现在看来它在大企业庞大的软件体系下确实很方便。虽然到每个开发者手中依然不怎么直接使用云原生开发,或者说不是完全的云原生开发,但是云原生的工作流程了解一下还是好的。 我个人认为云原生基本跟运维是一个活。 什么是云原生云原生计算基金会(CNCF)起初给出的定义: · 应用容器化 · 面向微服务 · 应用支持容器的编排调度 重定义:TBD Kubernetes为什么Kubernetes叫K8S?因为K与s中间有8个字母。 Kubernetes是什么?他是一个容器编排系统,用于实现对容器调度。 DockerDocker是容器,K8S是容器编排工具,containerd是K8S这个容器编排工具提供了CRI接口后从Docker中分离出来的runtime...
友善R5C那些事
这个完全不想折腾了,完全专注于作为一个稳定的路由器。 DockerPortainer12docker volume create portainer_datadocker run -d -p 8000:8000 -p 9443:9443 -p 9000:9000 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest Install Portainer CE with Docker on Linux Arm系统,跟树莓派一样,用这个也行。 PrometheusGrafanaGrafana Dashboard cadvisornode-exporterServer Monitoring // Prometheus and Grafana Tutorial Christian’s Boilerplates Raspberry Pi &...
树莓派Ubuntu那些事
OS installationDownload:Ubuntu for raspberry If you do not have a monitor for your raspi, please install and set up your ubuntu with Raspberry Pi Imager, and enable the ssh before your installation. Make sure you have a network connection on your raspi. First time setting up ubuntuSet up system time12sudo apt install ntpdatesudo ntpdate cn.pool.ntp.org (referance)[https://cloud.tencent.com/developer/article/1879686] Otherwise, you will meet issue when sudo apt update,...
设计模式
今天和同学会面闲聊,聊到了设计模式。他说设计模式还有不少用处,但是我基本上忘记了。想开这个Post复习一下,看看有机会研究一下吧。 设计模式都有哪些来着?最近提到了工厂模式,看来真得复习复习了。 CI/CDCI/CD 是持续集成(Continuous Integration)和持续交付/持续部署(Continuous Delivery/Continuous...
Unix命令行小工具
整理一些Unix命令行小工具统计cpp文件中有多少行代码:12find . | grep \.cpp$ | xargs cat | wc -lcat $(find . | grep \.cpp$) | wc -l 挺有意思的。 压缩1234567891011tar -cvf jpg.tar *.jpg #[//将目录里所有jpg文件打包成tar.jpg](https://xn--jpgtar-k18i60zu6u9rh3xhkqa1h032blufb97e1p9e.jpg/)tar -czf jpg.tar.gz *.jpg #[//将目录里所有jpg文件打包成jpg.tar后](https://xn--jpgjpg-k18i60zu6u9rh3xhkqa1h032blufb97e1p9e.xn--tar-x33e/),并且将其用gzip压缩,生成一个gzip压缩过的包,命名为jpg.tar.gztar -cjf jpg.tar.bz2 *.jpg...
gdb and lldb
GDBSet break point in GDBSet a break point in a source filecmd: b file:function e.g. 1b debug.c:func Set a break point at a linecmd: b file:num e.g. 1b debug.c:7 Set a break point at an addresscmd: b *address e.g. 1b *0x0000000000000 Set condition break pointcmd: b file:num if cond e.g. 1b debug:10 if a=1 Set temp? breakcmd: tbreak Cc printf unsigned long long 1printf("%llu", 285212672);
C的小知识(一)Flexible array
Referenceflexible struct arrary as a memeber of another struct Is using flexible array memebers in C bad practice? My summary on Flexible arrayWhat is a flexible array?1234567891011/** * struct ethtool_sfeatures - command to request change in device's features * @cmd: command number = %ETHTOOL_SFEATURES * @size: array size of the features[] array * @features: feature change masks */struct ethtool_sfeatures { __u32 cmd; __u32 size; struct ethtool_set_features_block...
Node.js
Node.js今天对node.js进行了简单的调整,调整如下: 123npm config set proxy http://127.0.0.1:7890npm config set https-proxy http://127.0.0.1:7890npm config set strict-ssl false 解除办法: 12npm config delete proxynpm config delete https-proxy 最后解决办法: 1npm config set puppeteer_skip_chromium_download true -g 看起来npm的代理也是挺麻烦的。 QuanX今天还尝试了一下Quanx做HTTP、SOCKS5代理服务器,可以也挺好用的。
Work flow on MacOS
AstronvimInstall AstronvimAstronvim.com my-astronvim astronvim community lazygitthemecatppuccin tmuxtmux-plugin-manager