👩🎓 TIL More About net/netip
Not really a “Today I Learned”… but today, I wanted to share this package with a colleague of mine, and had to search for it.
When need to work with ip prefixes and net/netip is not enough… use go4.org/netipx.
Not really a “Today I Learned”… but today, I wanted to share this package with a colleague of mine, and had to search for it.
When need to work with ip prefixes and net/netip is not enough… use go4.org/netipx.
How to show VLAN information of an interface?
$ ip -d link show IFACE
7: fabric@enp202s0f0np0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether b8:3f:d2:b9:2c:a4 brd ff:ff:ff:ff:ff:ff promiscuity 0 allmulti 0 minmtu 0 maxmtu 65535
vlan protocol 802.1Q id 1 <REORDER_HDR> addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 tso_max_size 524280 tso_max_segs 65535 gro_max_size 65536
OpenWrt disabling ipv6 dns for odhcpd
uci set dhcp.lan.dns_service="0"
uci set dhcp.lan.ra_dns="0"
uci commit dhcp
service odhcpd restart
So I don’t get any IPv6 dns server advertised.
You never stop learning new things. Just to set the scene. I’m a diehard vi user for 23+ years. Starting with nvi (because of because), ending up in using neovim these days. At least, I tell myself to be relatively fluent in navigating around and getting things done. However, there are still tricks to learn every day.
This time, it it about :h registers
. I ended up there by :Telescope registers
, just because I wandered around Telescope to learn what it provides, that I’m currently missing out.
I regularly use named registers ("a to "z
) for copying stuff around, and the "/
registers. I also knew about the “delete history” in the numbered registers.
Totally new to me is "0
, which holds the last yanked content.
So far, if I yanked something, and afterwards deleted a line. In my head, the yanked bits were lost. I went back, yanked it into a named registers, and continued.
Now, I only need to paste "0p
🧚♀️
Every day is a learning opportunity. I’m a fish shell user for about 8 years now. Don’t even know any more why I made the switch. But here I am 😄
Today I learned about a very nice feature… abbr
.
“abbr
manages abbreviations - user-defined words that are replaced with longer phrases when entered.”
Example. I want to have “aliases”, but don’t want to see the alias in my history, but rather the real command.
$ abbr kgp kubectl get pods
$ abbr kgn kubectl get nodes
When typing one of those, following by Space
or Enter
, the real command will be expanded, and thus, end up in your history.
Thanks @justingarrison for the hint in How I use kubectl!
It is a relatively short story, that is not even that entertaining.
In about 2015-ish (maybe a bit earlier), Go came more and more onto my radar.
At the time, I was working in primarily with Python, and at the time, Python devs were right in the middle of the python2 to python3 migration (debacle?). UnicodeDecodeError
anyone?
So, a language with a v1 compatibility promise sounded very appealing. Btw, the promise stood the test of time.
On the other hand, I was in building platforms to run applications and cloud something something. Seeing projects like Docker and Kubernetes evolving that are written in Go made it even more interesting to me.
I didn’t get the change to dive into Go at work, so I played around with it at home. There are some traces of reading data from an sht7x temperature and humidity sensor on my computer. And what should I say… coming from Python, I didn’t like Go particularly. Despite that, I kept Go on my radar. At the time (and still am up to date), I was pretty much in listening to podcasts. Maybe because of this combination, the release of the very first episode of Gotime didn’t pass me unnoticed. I fell in love with the OG crew, and have listened to each episode till today. Besides being fun and entertaining, it kept me up to date with the ecosystem. All of that helped, when I started to write more and more Go, got involved in the early phases of Cluster API for OpenStack and the Cloud Provider OpenStack.
These days, I don’t write much code. But when I do, I have the tendency to reach for Go more often than not. That might be a result of needing to write glue related to Kubernetes, where Go still is the lingua franca. But even outside of that ecosystem. I use Go for cli and TUI apps, using the fantastic bubbletea. Distributing just single binaries is so easy! Writing code to talk to OpenStack APIs, I somehow prefer gophercloud over Python and openstacksdk.
Today, together Go and Python are in pretty much my first choice for almost all programming I do. Doing Python for about 20 (😲 😳 😅), I still like the concepts and how fast you can get going with it. Especially if you are in a phase of prototyping. And nothing beats the repl 😄
One more thing about Gotime. Gotime didn’t just hooked me into Go, but it also brought me into Changelog universe, which I was not aware of before. Till today, I have listened to many shows, and am a ++ member.
Frustrierend!
Es war mal wieder so weit. Meine Schwiegermutter hat ihr Rad in die Werkstatt gegeben, weil “Es in den mittleren Gängen rattert”. Sie bekam das Rad wieder zurück, es sei alles in Ordnung.
Jetzt weiß ich nicht ob mein Anspruch zu hoch ist. Aber ich bin der Meinung, dass ein Mechaniker es bemerken darf wenn nur 7 von 9 Gängen erreichbar sind und sowohl das kleinste als auch das größte Ritzel nicht. Und dass sich daher die 9 Klicks der Schaltung auf nur 7 Gänge verteilen. Ich weiß natürlich nicht ob das nicht bemerkt oder einfach nur ignoriert wurde 🤷
Wie dem auch sei. Die Lösung war denkbar einfach. Die Limitschrauben und Kabelspannung anpassen. Für mich… als nicht-Mechaniker ohne Arbeitsständer war das ein Job von 20 Minuten. Mit Ständer wären es vermutlich nur 10.
Und das ist nicht das erste mal, dass ich ein Rad aus der Werkstatt zurück bekommen habe und erst einmal Hand anlegen musste. Beim letzten mal waren es komplett falsch eingestellte Scheibenbremsen. Die haben nicht nur Geräusche gemacht, sondern die Bremsenbeläge lagen am Rotor an 🙄
Unseren Familiensommerurlaub verbringen wir in der Nähe von Sterzing. Weil wir kein Auto haben, versuchen wir uns immer Regionen auszusuchen die gut per Bahn und Bus erreichbar sind. So auch dieses Jahr. Von Berlin aus nach München, dort umsteigen in Richtung Italien. Von Brenner bis Sterzing drei Stationen Regionalbahn. Dann 20 Minuten Bus ins Ridnauntal. Wir sind fast ganz am Ende des “Sackgassentales”. Von hier aus können wir direkt von der Haustüre los wandern.
Das beste hier. Trotz der Lage am Ende des Tales, fährt einmal stündlich der Bus nach Sterzing. Das Busnetz hier ist hervorragend, so dass man auch Mal in ein anderes Tal wandern kann und mit dem Bus zurück fahren. Durch die ActiveCard komplett kostenlos! Heute z.B. sind wir um 8:45 nach Sterzing, dort mit der Gondel zum Rosskopf, oben 1.5 Stunden gewandert, eine Abfahrt mit der Sommerrodelbahn gemacht und um 12:40 für das olympische Handballfinale 🤾♂️ wieder zurück gewesen. Ob sich das gelohnt hat 🤷
Tipps:
Was geht noch, aber nicht gemacht:
Well. I would say, primarily because of my dad. I remember the days at home with a 14.4 baud modem, connecting to BTX. There was a time in the nineties, it felt like everyone should be on the Internet. Crazy, isn’t it?
In about 98 through to 2k, I had a very curious IT teacher. The lessons were not mandatory, but we had a computer room in school with let’s say about twenty 486 PCs. We learned some Basic and Pascal, and later HTML and JavaScript. Which isn’t a matter of course for a school to this day!
At home I also got an old affordable 386, and a box of SuSE Linux 5.2. I don’t remember me doing too much crazy stuff with it, besides what we learned at school.
End of 1999, again my dad, encouraged me to ask for an internship at a very small local ISP. I got it, and in succession was paid “to do computer stuff” for them once a week. In the summer of the following year, I started a 3 year training (a very German thing) there. After that, I was allowed to call myself a Fachinformatiker Anwendungsentwicklung.
Back in those days, Datacenters were some room in some buildings. In our case, our office was in the old kitchen of a former restaurant. Guess what, the server room was in the former cooling room. We had air conditioning with a bucket under a pipe. On hot summer weekends, one of us needed to go to the office on Sunday to empty the bucket. However. I learned so much in those three years. Not much in the associated school, where I was actually pretty average, but at work. We were four guys doing pretty much everything. Running an ISP with ISDN/modem dial-in, running web, Mail, DNS, and what not. Programming web applications with CGI/perl and php3. We automated the maintenance of our machines with perl scripts. I ran the tech support, later with a driver’s license, fixed the customer server on site. Did I mention, that we ran all of the servers and the dial in connections over a 2 Mbit/s line? Eventually, in about 2003, we managed to move everything out of the cooling room and into a real Datacenter. There were not many abstractions, or configuration management or what not. It was a time of figuring out stuff, and automating with a script where possible. 🤔 Not too different to today!
I’m still very thankful for being there at the time. Learned tons, without a very formal education. Later, I went to college and did my formal degree. But I’m very sure, most of my capabilities stem from those (initial) three years.
From time to time, I’m curious in some programming language. Once, it happened to be Rust, and I read the Rust book in the first lock down. Which I think is a really good source. Well done! Over the past years, I also read Rust in Action.
It did happen, that I didn’t write a single line of Rust so far, but read some code. A couple of weeks rustlings popped up onto my radar. I installed it, and walked through it. Only equipped with my theoretical knowledge, I made it up to section 20 so far without needing many hints.
I don’t really know what to I want to say, other than. Play around, try out new stuff, keep learning 😄