- 14 June 2025 (10 messages)
-
#docker
https://www.dasblinkenlichten.com/docker-networking-101-user-defined-networks/Docker networking 101 – User defined networksIn this post, I’d like to cover some of the new Docker network features. Docker 1.9 saw the release of user defined networks and the most recent version 1.10 added some additional features.&n…
-
#programming
https://www.atlassian.com/blog/software-teams/covariance-and-contravariance-in-scalaCovariance and Contravariance in ScalaI spent some time trying to figure out co- and contra-variance in Scala, and it turns out to be both...
-
#golang
日,没怎么用过gomonkey,不知道gomonkey 不能模拟inline的函数,还一顿乱分析😅,还是得多看文档。
> gomonkey fails to patch a function or a member method if inlining is enabled, please running your tests with inlining disabled by adding the command line argument that is -gcflags=-l(below go1.10) or -gcflags=all=-l(go1.10 and above).
https://github.com/agiledragon/gomonkey#notes
The test code does not actually call the utilnet.ChooseHostInterface function directly, because the compiler inlined it by replacing the call with a direct call to the underlying chooseHostInterface function.
As a result, patching or mocking the utilnet.ChooseHostInterface function entry point has no effect.
To properly mock the behavior, the code should use an indirection variable referencing utilnet.ChooseHostInterface, which can then be replaced in tests.
0x0043 00067 (/mnt/tool/pkg/github.com/kubeedge/kubernetes/staging/src/k8s.io/apimachinery@v1.30.7-kubeedge1/pkg/util/net/interface.go:367) PCDATA $1, $0
0x0043 00067 (/mnt/tool/pkg/github.com/kubeedge/kubernetes/staging/src/k8s.io/apimachinery@v1.30.7-kubeedge1/pkg/util/net/interface.go:367) CALL k8s.io/apimachinery/pkg/util/net.chooseHostInterface(SB)
0x0048 00072 (/mnt/foss/kubeedge/pkg/util/util.go:48) TESTQ DI, DI
0x004b 00075 (/mnt/foss/kubeedge/pkg/util/util.go:48) JEQ 130
0x004d 00077 (/mnt/tool/pkg/github.com/kubeedge/kubernetes/staging/src/k8s.io/apimachinery@v1.30.7-kubeedge1/pkg/util/net/interface.go:367) MOVQ CX, command-line-arguments.ipAddr.cap+72(SP)
0x0052 00082 (/mnt/tool/pkg/github.com/kubeedge/kubernetes/staging/src/k8s.io/apimachinery@v1.30.7-kubeedge1/pkg/util/net/interface.go:367) MOVQ BX, command-line-arguments.ipAddr.len+64(SP)
0x0057 00087 (/mnt/tool/pkg/github.com/kubeedge/kubernetes/staging/src/k8s.io/apimachinery@v1.30.7-kubeedge1/pkg/util/net/interface.go:367) MOVQ AX, command-line-arguments.ipAddr.ptr+104(SP)
0x005c 00092 (/mnt/foss/kubeedge/pkg/util/util.go:53) MOVQ command-line-arguments.hostName+144(SP), AX
0x0064 00100 (/mnt/foss/kubeedge/pkg/util/util.go:53) MOVQ command-line-arguments.hostName+152(SP), BX
// ChooseHostInterface is a method used fetch an IP for a daemon.
// If there is no routing info file, it will choose a global IP from the system
// interfaces. Otherwise, it will use IPv4 and IPv6 route information to return the
// IP of the interface with a gateway on it (with priority given to IPv4). For a node
// with no internet connection, it returns error.
func ChooseHostInterface() (net.IP, error) {
return chooseHostInterface(preferIPv4)
}
func TestMockChooseHostInterface(t *testing.T) {
assert := assert.New(t)
patch := gomonkey.ApplyFunc(utilnet.ChooseHostInterface, func() (net.IP, error) {
fmt.Println("mocked ChooseHostInterface called")
return net.ParseIP("10.1.2.3"), nil
})
defer patch.Reset()
ip, err := utilnet.ChooseHostInterface()
assert.NoError(err)
assert.Equal("10.1.2.3", ip.String())
}
Running tool: /usr/local/go/bin/go test -timeout 30s -run ^TestMockChooseHostInterface$ github.com/kubeedge/kubeedge/pkg/util
--- FAIL: TestMockChooseHostInterface (0.00s)
/mnt/foss/kubeedge/pkg/util/util_test.go:157:
Error Trace: /mnt/foss/kubeedge/pkg/util/util_test.go:157
Error: Not equal:
expected: "10.1.2.3"
actual : "192.168.0.138"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-10.1.2.3
+192.168.0.138
Test: TestMockChooseHostInterface
FAIL
FAIL github.com/kubeedge/kubeedge/pkg/util 0.019s
FAILGitHub - agiledragon/gomonkey: gomonkey is a library to make monkey patching in unit tests easygomonkey is a library to make monkey patching in unit tests easy - agiledragon/gomonkey
-
#git
把local commit reset了,然后误把文件删除了,下面是一个办法找回的,默认的git垃圾回收触发时间还是很长的。由于是文件在git时是blob对象,所以只关心blob就行,可以用cat-file查看文件blob内容,找到对应的就行。
git fsck --lost-found
Checking object directories: 100% (256/256), done.
Checking objects: 100% (115903/115903), done.
dangling commit a3023005ea6e7ae0599e04d935bb723837756cb7
dangling commit 70083419e3a84be265ce431c586bf1f774ea939f
dangling commit 8d10fc92285fa0148653518ebe8c2a1d4de61e44
dangling commit ea12542ac6eaf1735c1fb51d789504bf0fd2a9ac
dangling commit 221340ba8eced67c9a31ec9b609a9caa4a8b5967
dangling commit d422cc6b388b272b463ec1ce4a8b31cc30d2a1c7
git cat-file -p 6d708c30a16fd5e2d0dd907cc0433508017cbd2e > test.sh -
#rust
https://www.youtube.com/watch?v=8O0Nt9qY_vo&list=PLqbS7AVVErFiWDOAVrPt7aYmnuuOLYvOa&index=4&t=2489sCrust of Rust: Smart Pointers and Interior MutabilityIn this fourth Crust of Rust video, we cover smart pointers and interior mutability, by re-implementing the Cell, RefCell, and Rc types from the standard library. As part of that, we cover when those types are useful, how they work, and what the equivalent thread-safe versions of these types are. In the process, we go over some of the finer details of Rust's ownership model, and the UnsafeCell type. We also dive briefly into the Drop Check rabbit hole (https://doc.rust-lang.org/nightly/nomicon/dropck.html) before coming back up for air. This is definitely a more technically advanced stream than some of the earlier ones, and may be a little harder to follow. I apologize for that in advance! Please do leave questions here or on Discord and I'll try to help explain what's going on. You can find the final code at https://gist.github.com/jonhoo/7cfdfe581e5108b79c2a4e9fbde38de8 and the Discord at https://discord.gg/RJdqQ9n 0:00:00 Introduction 0:01:11 Discord 0:02:31 Agenda 0:03:50 Interior Mutability 0:07:47 Cell 0:23:39 Trying to Test Cell 0:40:17 UnsafeCell 0:41:21 RefCell 0:54:21 RefCell Smart Pointer 1:06:27 Rc (reference counted ptr) 1:23:49 NonNull 1:31:55 PhantomData and Drop Check 1:44:25 ?Sized Briefly 1:47:30 Thread Safety 1:54:20 Copy-on-Write (Cow) You can watch the live version with comments at https://www.youtube.com/watch?v=1e5aDptlGoI
-
#tool
TG同步工具,防止账号被封,数据是保存在sqlite中的,还可以部署一个web界面
https://github.com/knadh/tg-archiveGitHub - knadh/tg-archive: A tool for exporting Telegram group chats into static websites like mailing list archives.A tool for exporting Telegram group chats into static websites like mailing list archives. - knadh/tg-archive
-
#life
闹麻了,三个月前检查眼睛,说我眼底不好,缺叶黄素,本来我就有一直在吃,一顿推荐,说我吃的牌子不好没效果,就买了他们的,如今吃了三个月,今天又去检查了,还缺,有个评分系统,比上次少一分,店员人傻了😅。
不过保护眼睛,我现在都是希望有二小时时间在户外跟太阳对视。 -
#sre
https://www.youtube.com/watch?v=VAgT7CY572UA Field Guide to Reliability Engineering at Zalando • Heinrich Hartmann • GOTO 2024This presentation was recorded at GOTO Amsterdam 2024. #GOTOcon #GOTOams https://gotoams.nl Heinrich Hartmann - Head of Reliability Engineering at Zalando SE @HeinrichHartmann RESOURCES https://twitter.com/heinrichhartman https://github.com/HeinrichHartmann https://www.linkedin.com/in/heinrich-hartmann-b524a076 https://heinrichhartmann.com ABSTRACT We present Zalando's approach to engineering reliability from a very small to a very large scale, and touch on both technological and human angles. With over 50M customers across 23 countries, Zalando operates one of the largest eCommerce platforms worldwide. Achieving a reliable customer experience requires the intricate collaboration of over 3000 applications and more than 2000 software engineers who constantly seek to improve and extend product capabilities. In the talk we will walk you through the best practices Zalando has arrived to consistently achieve high levels of reliability. • We will start with a simple stand-alone application and cover best practices for instrumentation, monitoring and alerting. • We continue the journey to products that span multiple applications which are operated by different teams. At this scale methods like tracing and incident management become important. • Finally we will present technologies and processes which are used to steer reliability on the company level. Here WORM Cascades and Risk Management have proven highly effective. [...] TIMECODES 00:00 Intro 03:45 Agenda 04:04 Principles 10:32 Context 14:44 Operations at Zalando 14:49 Alerting 21:25 Dashboards 24:32 Observability 31:51 SLOs 37:32 Incident process 45:20 WORMs 50:01 Summary 50:37 Outro Download slides and read the full abstract here: https://gotoams.nl/2024/sessions/3236 RECOMMENDED BOOKS Donella H. Meadows • Thinking in Systems • https://amzn.to/3XtqYCV Nicole Forsgren, Jez Humble & Gene Kim • Accelerate • https://amzn.to/442Rep0 Kim, Humble, Debois, Willis & Forsgren • The DevOps Handbook • https://amzn.to/47oAf3l Jez Humble & David Farley • Continuous Delivery • https://amzn.to/452ZRky Jez Humble, Joanne Molesky & Barry O'Reilly • Lean Enterprise • https://amzn.to/47pcOXD Beyer, Murphy, Rensin, Kawahara & Thorne • The Site Reliability Workbook • https://amzn.to/3I5iPNQ Petoff, Murphy, Beyer & Jones • Site Reliability Engineering • https://amzn.to/3uSoy6t Adkins, Beyer, Blankinship, Lewandowski, Oprea & Stubblefield • Building Secure and Reliable Systems • https://amzn.to/48p0gio https://twitter.com/GOTOcon https://www.linkedin.com/company/goto- https://www.instagram.com/goto_con https://www.facebook.com/GOTOConferences #Reliability #ReliabilityEngineering #DevOps #Observability #IncidentProcess #SLOs #HeinrichHartmann #Zalando CHANNEL MEMBERSHIP BONUS Join this channel to get early access to videos & other perks: https://www.youtube.com/channel/UCs_tLP3AiwYKwdUHpltJPuA/join Looking for a unique learning experience? Attend the next GOTO conference near you! Get your ticket at https://gotopia.tech Sign up for updates and specials at https://gotopia.tech/newsletter SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily. https://www.youtube.com/user/GotoConferences/?sub_confirmation=1
-
#blog
https://engineering.zalando.com/Zalando Engineering BlogWe're the technology team at Zalando, the world's most fashionable tech company. Learn more about how we build, scale, and operate our platform and teams.
-
#tool
Zalando的技术雷达
https://github.com/zalando/tech-radarGitHub - zalando/tech-radar: Visualizing our technology choicesVisualizing our technology choices. Contribute to zalando/tech-radar development by creating an account on GitHub.
- 15 June 2025 (7 messages)
-
#bitcoin
https://github.com/rooch-networkRoochNetworkThe Native Application Layer for the Bitcoin Ecosystem - RoochNetwork
-
#bitcoin
https://github.com/starcoinorg/starcoinGitHub - starcoinorg/starcoin: Starcoin - A Move smart contract blockchain network that scales by layeringStarcoin - A Move smart contract blockchain network that scales by layering - starcoinorg/starcoin
-
#rust
https://github.com/rust-cli/config-rsGitHub - rust-cli/config-rs: ⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications). - GitHub - rust-cli/config-rs: ⚙️ Layered configuration system for Rust applications (with s...
-
#database
https://www.youtube.com/watch?v=9Rdwh0rNaf0DuckDB: Crunching Data Anywhere, From Laptops to Servers • Gabor Szarnyas • GOTO 2024This presentation was recorded at GOTO Amsterdam 2024. #GOTOcon #GOTOams https://gotoams.nl Gábor Szárnyas - Technical Writer at DuckDB @gaborszarnyas4656 RESOURCES https://twitter.com/szarnyasg https://github.com/szarnyasg https://www.linkedin.com/in/szarnyasg https://szarnyasg.github.io https://duckdb.org ABSTRACT DuckDB is an analytical relational database management system which runs in-process, i.e., it is embedded within its host application that may be written in many popular languages (C/C++, Python, R, Java, etc.). DuckDB has full SQL support and can natively read/write formats such as CSV, Parquet, and JSON. It is built according to a modern system architecture, which allows running complex queries in parallel and spilling to disk for larger-than-memory workloads. This talk discusses DuckDB's key building blocks and demonstrates how it can handle hundreds of GBs of data on a laptop, or terabytes of data on a single server. [...] TIMECODES 00:00 Intro 01:23 What is DuckDB? 02:48 Demo 05:09 What is DuckDB? continued 06:48 Demo 11:09 In-process architecture 13:44 Internals: Storage & execution 19:21 Portability 20:56 Ergonomic 24:48 State of DuckDB 25:58 Extensions 27:10 Use cases 31:34 Limitations 32:57 Business model 35:03 Summary 36:06 Outro Download slides and read the full abstract here: https://gotoams.nl/2024/sessions/3114 RECOMMENDED BOOKS Mark Needham, Michael Hunger & Michael Simons • DuckDB in Action • https://amzn.to/45QwSli Simon Aubury & Ned Letcher • Getting Started with DuckDB • https://amzn.to/3VPk4qS Wei-Meng Lee • DuckDB: Up and Running • https://amzn.to/3xJsHeu https://twitter.com/GOTOcon https://www.linkedin.com/company/goto- https://www.instagram.com/goto_con https://www.facebook.com/GOTOConferences #DuckDB #MotherDuck #Data #DataManagement #Parquet #RelationalDatabase #SQL #WebAssembly #WASM #ApacheSpark #GaborSzarnyas CHANNEL MEMBERSHIP BONUS Join this channel to get early access to videos & other perks: https://www.youtube.com/channel/UCs_tLP3AiwYKwdUHpltJPuA/join Looking for a unique learning experience? Attend the next GOTO conference near you! Get your ticket at https://gotopia.tech Sign up for updates and specials at https://gotopia.tech/newsletter SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily. https://www.youtube.com/user/GotoConferences/?sub_confirmation=1
-
#kafka
https://github.com/birdayz/kafGitHub - birdayz/kaf: Modern CLI for Apache Kafka, written in Go.Modern CLI for Apache Kafka, written in Go. Contribute to birdayz/kaf development by creating an account on GitHub.
-
#kafka
https://github.com/twmb/franz-goGitHub - twmb/franz-go: franz-go contains a feature complete, pure Go library for interacting with Kafka from 0.8.0 through 4.0+. Producing, consuming, transacting, administrating, etc.franz-go contains a feature complete, pure Go library for interacting with Kafka from 0.8.0 through 4.0+. Producing, consuming, transacting, administrating, etc. - twmb/franz-go
-
#tool
https://github.com/th-ch/youtube-musicGitHub - th-ch/youtube-music: YouTube Music Desktop App bundled with custom pluginsYouTube Music Desktop App bundled with custom plugins - th-ch/youtube-music
- 18 June 2025 (9 messages)
-
#tool
以后用这个搞环境
GitHub - jdx/mise: dev tools, env vars, task runnerGitHub - jdx/mise: dev tools, env vars, task runnerdev tools, env vars, task runner. Contribute to jdx/mise development by creating an account on GitHub.
-
#tool
网络排查心得
GitHub - nicolaka/netshoot: a Docker + Kubernetes network trouble-shooting swiss-army containerGitHub - nicolaka/netshoot: a Docker + Kubernetes network trouble-shooting swiss-army containera Docker + Kubernetes network trouble-shooting swiss-army container - nicolaka/netshoot
-
#blog
MegaEase的远程工作文化
https://coolshell.cn/articles/20765.html -
#blog
2022 年终总结 \| 高策
2023 年终总结 \| 高策
2024 年终总结:AGENT、AI INFRA 与 CODING \| 高策
AI 应用层的壁垒在哪里 \| 高策
纪念我家的宠物猫 ENV \| 高策
A little tip to improve rust-analyzer memory usage - Bitestring's Blog2022 年终总结江湖小虾米
-
#paper
GitHub - ysj1173886760/paper\_notes: notes i made while reading the papers. Including database, distributed systems and HPC.
GitHub - dyweb/papers-notebook: :page\_facing\_up: :page\_with\_curl: 论文阅读笔记(分布式系统、虚拟化、机器学习)Papers Notebook (Distributed System, Virtualization, Machine Learning)GitHub - ysj1173886760/paper_notes: notes i made while reading the papers. Including database, distributed systems and HPC.notes i made while reading the papers. Including database, distributed systems and HPC. - ysj1173886760/paper_notes
-
#cni
Understanding CNI (Container Networking Interface) – Das Blinken Lichten
Using CNI with Docker – Das Blinken LichtenUnderstanding CNI (Container Networking Interface)If you’ve been paying attention to the discussions around container networking you’ve likely heard the acronym CNI being used. CNI stands for Container Networking Interface and it̵…
-
#ai
AI Infrastructure Landscape -
#tool
水印去除工具
https://github.com/StuHude/PDF-Watermark-Removal
依赖
uv pip install opencv-python
uv pip install fpd
uv pip install flask
uv pip install pil
uv pip install numpy
uv pip install pillow
uv pip install PyPDF2
uv pip install PyMuPDF
uv pip install reportlabGitHub - StuHude/PDF-Watermark-Removal: PDF文件/图像 去除水印PDF文件/图像 去除水印. Contribute to StuHude/PDF-Watermark-Removal development by creating an account on GitHub.
-
#blog
https://turso.tech/blog/working-on-databases-from-prison - 24 June 2025 (1 messages)
-
#database
https://www.bilibili.com/video/BV1a64y1X7ys/技术分享:Prometheus是怎么存储数据的(陈皓)_哔哩哔哩_bilibiliSlides: https://www.slideshare.net/haoel/how-...- Understanding Time Series- What's the Fundamental Problem- Prometheus Solution (v1.x)- New Design of Prometheus (v2.x)- Data Compression Algorithm, 视频播放量 9625、弹幕量 20、点赞数 229、投硬币枚数 137、收藏人数 672、转发人数 73, 视频作者 北京重载智子, 作者简介 ,相关视频:技术分享:Distributed Lock Manager (陈皓),技术分享:Kubernetes Networking Model (赵锟),技术分享:Kube-OVN 容器性能优化之旅(刘梦馨),技术分享:Sledge: Serverless + WASM Runtime (吴怡恒),技术分享:用 Easegress + WebAssembly 做秒杀 (张博民),技术分享:无侵入式【全链路多重灰度发布】和【全链路压力测试】(龙韵 + 张博民),技术分享:Virtual Memory 技术介绍 (邹英杰),MegaEase Cloud 云原生平台演示,技术分享:How To Write a JavaAgent (袁伟),技术分享:EaseAgent 2.0 功能设计和代码实现(陈皓/赵锟/周锦泽)
- 29 June 2025 (1 messages)
-
初入投资容易犯的错误
我想列举几个初入投资容易犯的错误,其中的坑我也踩过。