]> git.r.bdr.sh - rbdr/r.bdr.sh/blob - learning.txt
Focus on weight rather than style
[rbdr/r.bdr.sh] / learning.txt
1 2024-09-16: @FocusedValue and @FocusedBinding provide convenient ways to share values for the current view.
2 2024-04-03: DDP doesn't work through Wi-Fi because of issues on how packets are transformed between Ethernet and Wi-fi, which messes up the Datagram :'(. Not all routers do, DD-WRT might!
3 2024-03-31: You can run a security audit of your systemd units, and limit a lot how they're able to operate. This is very handy so even if I write some code that could be exploited, if I prevent the process from being able to do certain things, it reduces the exposure.
4 2024-03-30: There's a VNC client for 68k macs called miniVNC.
5 2024-03-26: AWS DMS migrates the data but not indexes, sequences and relations.
6 2024-03-25: Pulumi doesn't deal well with renaming target groups, as the listener rules they use are still there so it can't edit them.
7 2024-03-24: Lynis is a tool that lets you audit hardening status in linux systems. It has good recommendations to improve security.
8 2024-03-22: There are account settings in AWS you can only enable for a role, but you need to use the root account to do this. This is helpful to control ENI trunking in only some instances.
9 2024-03-15: Most popular Linux media players implement “MPRIS”, a dbus based protocol that lets you control or get information from players.
10 2024-03-13: Man pages are stored gzipped. I should probably update my packaging to make sure the manpages are gzipped first.
11 2024-03-11: You can iterate over several architectures in make by setting a variable to space separated values, then using the variable name as the target (eg. $(architectures):). Then you can access the value with $@
12 2024-03-09: I misunderstood how expect() works in rust. In a Result it won't return Err, it'll panic. .map_err() and ok_or_else() are a closer way to offer the same result.
13 2024-03-06: The definition of the first week in the ISO standard is the one that contains january 4th.
14 2024-03-06: In lua os.time() if you pass month 13 or month -1, it correctly calculates the next or previous year, so you don't have to manually do that math.
15 2024-03-03: The string methods in lua are attached to the metatable so you can run them with :, but the table ones aren't so you always need table.method().
16 2024-03-02: Lua regular expressions aren't fully compatible with regex :( (eg. you can't use the pipe operator)
17 2024-02-16: scroll-behavior: smooth; gives JS-free smooth scrolling when navigating anchors.
18 2024-02-11: You can't append some characters to iskeyword in vim, so you can't make boxes navigable like words.
19 2024-02-10: Long lived connections don't seem to fare well in a dialup PPP with the RS232 modem. For more usable internet on the SE/30 a PDA ethernet card is required.
20 2024-02-10: Even though the old net router is sold as v4, if it has the SD slot you should flash it as v6, otherwise it doesn't work.
21 2024-02-09: Some disk images will be wrecked even if you restore their attributes (apparently DiskCopy 6.3 images).
22 2024-02-01: The TCF API is good to deal with individual vendors, but a big pain to use it for more blanket categories. Check __tcfapi('addEventListener', 2, function (tcdata, success) { debugger; }); to explore the object.
23 2024-01-29: You can't have CNAME and TXT records on the same subdomain!
24 2024-01-27: If you accidentally rewind a whole 35mm film, you can get it back by wetting the end of a new film and putting it inside the cartridge. It's a pain to do but it's better than losing a whole cartridge.
25 2024-01-24: When AppleTalk is enabled you can't use the printer port for a modem in a Macintosh SE/30. You need to disable it in Chooser first.
26 2024-01-23: AWS Glue has some very inefficient ways of composing queries, so it's sometimes easier to embed the query itself. In postgres it doesn't let you but you can add sources for each table and then run the query. This seems to work a lot faster.
27 2024-01-22: ssl_early_data on; can mess up your responses in safari if you set it in more than one place. What's worse, because of the caching it uses it can be annoying to revert.
28 2024-01-21: You can inject HTML and CSS to gitweb without modifying the default files by using $home_text and pointing it to a variable, and push @stylesheets.
29 2024-01-20: App groups can let you share application data, but they will create a new container, so unless you have a remote data source it will erase your data. It's better to start new mac or ios projects with a group
30 2024-01-19: You can rename the classes in xcdatamodel in order to avoid collisions, in case you named an entity something too generic.
31 2024-01-18: MacPPP with modem initialization options works much better than ZTerm + FreePPP, and allows 115200 baud. You just have to set the modem to initialize with AT, and then dial PPP.
32 2024-01-17: Mastodon will NOT auto-clean the media directory, which can quickly bubble in size, and you can't ask sidekiq to deal with this so you need to set a cron job. A systemd.timer can handle both cases.
33 2024-01-16: With dnsmasq + tailscale you can easily combine your home lab with a remote server and make management a lot easier without exposing some services to the web. A local dnsmasq running on raspberry pi can make sure all local services have a nice name, and then can point an internal url to the vps. In firewalld you need to block connections unless they come from your 100.0.0.0/8 block.
34 2024-01-16: You don't actually need the users in unix in some situations, you can use an arbitrary number of the id and if the other system expects it, then it will work. In fact, you can "sudo" into that if runas_allow_unknown_id (then run sudo -u \#9999 <your_command>)
35 2024-01-15: SELinux provides restrictions to files I wasn't aware of, and can prevent execution in some contexts. With eza you can view it with -Z.
36 2024-01-14: On linux you can see logical volumes inside a partition with lsblk, they're shown as lvm. If you resize a partition, you still need to resize the lvm (eg. with `lvresize -l +100%FREE` to take all remaining free space), AND the filesystem (eg. using resize2fs). This is important eg when installing an OS from an image as you might not be using your whole disk.
37 2024-01-14: On fedora rather than ufw or nftables, you use firewalld. You can create services (eg. gopher with port tcp 70 goes in /etc/firewalld/services/gopher.xml), attach them to zones with `firewall-cmd --zone=<YOURZONE> --add-service=gopher --permanent`
38 2024-01-14: User systemd files are expected in /etc/ and not /lib/
39 2024-01-14: You can use @ and %i in systemd to have multiple instances (eg myfile@.service, and then executable=blabla %i) where %i will be what comes after @. (So in myfile@howdy, %i will expand to howdy)
40 2024-01-13: PPP Connections stay alive in the old net router, so you don't need to run ATDTPPP again, but just the connection.