Hi there 👋

Welcome to Yanblog

OSPF by 7 Examples, GNS3 and Cisco

Simple Model Step by Step R1 enable conf ter interface f 0/0 ip addr 10.10.10.1 255.255.255.0 no shutdown exit router ospf 1 network 10.10.10.0 0.0.0.255 area 0 exit end R2 enable conf ter interface f 0/0 ip addr 10.10.10.2 255.255.255.0 no shutdown exit router ospf 1 network 10.10.10.0 0.0.0.255 area 0 exit end 🎉 Single Area Model Topology Step by Step PC1 ip 10.10.10.10/24 10.10.10.1 PC2 ip 50.50.50.50/24 50.50.50.1 R1 enable conf ter interface f 0/0 ip addr 10....

May 4, 2024 · 10 min · 2105 words · Zhao Yanbo

Static Routing by 3 Examples, GNS3 and Cisco

In this blog we will go through the procedure of configuring static routing on Cisco devices in GNS3. Prequires Install GNS3 Import Cisco device image as EtherSwitch and Router. I’m using C3660. Example 1 Topology fa1/1┌────┐ fa1/2 ┌─────┤ R1 ├──────┐ │ └────┘ │ │e0 │ ┌─┴──┐ ┌──┴─┐ │VPC1│ │VPC2│ └────┘ └────┘ Step by Step on Router: enable conf ter do show interfaces status interface fa 1/1 no switchport ip address 192....

April 20, 2024 · 3 min · 572 words · Zhao Yanbo

给《第一行代码 Android 第三版》第三章打补丁

作者在编写这本书第三版的时候还是 Android 10,但当我读到这本书手机上跑的已经是 Android 14 了,期间发生了很多技术上的变化。我把遇到的坑列出来,希望能给你提供一些参考。 第三章 3.2 kotlin-android-extensions 已被弃用,现在用 Jetpack view binding (3.2.4) Android Developers 上这篇 Migrate from Kotlin synthetics to Jetpack view binding 指出 kotlin-android-extensions 已被弃用,应该用 Jetpack view binding。但我写到这里才发现我一直用的是 databinding 而不是 viewbinding。好在这俩差不多。 以下是将 findViewById() 换用为 View Binding 的方法 在 build.gradle.kts (Module :app) 中添加以下字段启用 View Binding ... android{ ... buildFeatures{ ... viewBinding = true } } 然后 Sync Project with Gradle Files 使其生效。我这里的快捷键是 Ctrl+Shift+O。 在 onCreate() 中添加如下代码 (假设 Activity 名为 MainActivity)...

February 3, 2024 · 1 min · 166 words · Zhao Yanbo

My Wishlist

I might be able to buy these things in the next 5 years. Just for fun, not for productivity. Compute Clockwork Devterm Clockwork uConsole Raspberry Pi 5 8G Now I own a Raspberry Pi 3B teenage engineering computer-1 Google Pixel 8 Pro Now I own a Pixel 7 Steam Deck OLED Play Clockwork GameShell Playdate Nintendo Switch Lite Media Sigma 18-35mm F1.8 Art DC HSM Lens for Nikon Sony ICD-TX660 Mamiya RB67 Pro-S (6x7 Format) Nikon F100 Nikon Z5 Interact Meta Quest 3 HHKB PROFESSIONAL HYBRID TYPE-S (CHARCOAL/STAMPED) Logitech MX Ergo iQunix A80 魔派 双子星二代HD旗舰版 Equipment RIGOL普源 DS1202Z-E 数字示波器

January 21, 2024 · 1 min · 99 words · Zhao Yanbo
博客的封面

12元的键盘托, Sonshi Style

我在三年前买了一块 68 键的 Keychron K6,一直用到现在。键盘怎么摆对我来说选择不多,一是宿舍空间狭窄,二是视力不好而倾向贴近屏幕,我自然地把机械键盘叠在笔记本自带键盘上面,Keychron K6 的宽度正好能卡在小新 Pro13 的 C 面上而不触到自带键盘。后来听 内核恐慌 聊 HHKB 和机械键盘,做了些研究才知道这种方式叫 Sonshi Style(Japanese: 尊師スタイル) 。据说得名于 RMS 使用键盘的习惯。与有荣焉,FOSS 基因贯穿我全身,沸腾! 最近从联想小新 Pro13 2020 换到了 Pro16 2023,屏幕变大一圈的同时键盘也宽出了一块数字键盘。拿到手开始用,发现 Keychron K6 现在完全淹没在笔记本自带键盘里。我的另一把 TKL 键盘(高斯 GS87D,不推荐,但现在也买不到) 倒是可以坐在新电脑上,可惜我并没有出门背这块键盘的打算。 其实我的需求在客制化键盘圈子里普遍存在,特别是 HHKB,虽然 HHKB 可能并不算是客制化。淘宝上有卖成品的 “HHKB Macbook 键盘垫板”,但只要买过相关产品都知道但凡沾上 HHKB 或 Macbook 其中一个之后溢价有多高,更何况两个都沾。一块亚克力板加上四个脚垫能卖到 ¥38 甚至 ¥49 真是有点疯,就算¥20 我都嫌贵。 我量完尺寸后用 LibreCAD 画了一块,DXF文件在这里。你可以先打印到纸上看看尺寸合不合适,不合适或者不喜欢可以量完尺寸之后照着画一张,用不了五分钟。 下单亚克力的时候记得 厚度 3mm,太薄了可能会形变压到电脑自带的键盘。推荐买带颜色的,不仅更好看一些,更是防止全透明因为没被注意到而造成把屏幕夹爆的悲剧。我找淘宝店用¥11 打了一张。 防滑脚垫买 “半球胶粒”,透明硅胶材质,厚度2mm,直径5mm。泡沫材质的基本不防滑,不要买。我用 ¥5.9 买了 25 粒,每个键盘托用4~8粒,成本¥1~2。 这样下来一块板子只需要12元左右,材料还都包邮。你是要蓝的还是绿的、磨砂还是光面、透明还是实色都随便选,最重要的是尺寸完全适合手里的电脑。不仅省到钱还能爽到,实在太爽了。 我之后又买了一块 Keychron K3,过程略微曲折,有时间会再写一篇 Blog 聊聊购买经历和使用体验。剧透一下,挺满意的。

January 19, 2024 · 1 min · 70 words · Zhao Yanbo