]> git.r.bdr.sh - rbdr/txt/blame - learning.md
Add latest learnings
[rbdr/txt] / learning.md
CommitLineData
8a96796c
RBR
12024-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.
22024-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
32024-01-19: You can rename the classes in xcdatamodel in order to avoid collisions, in case you named an entity something too generic.
c57b0f38
RBR
42024-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.
52024-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.
1260b987 62024-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.
e1293d89 72024-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>)
2e8c5fee 82024-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.
cca2c219 92024-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.
76ed347e 102024-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`
2e8c5fee
RBR
112024-01-14: User systemd files are expected in /etc/ and not /lib/
122024-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)
132024-01-13: PPP Connections stay alive in the old net router, so you don't need to run ATDTPPP again, but just the connection.