Posts

Showing posts from July, 2023

Various System Stuff

 Typically I'll set up an instance, and get everything working as I like, and then promptly forget everything about it until the next time I need to create an instance from scratch. This is great for memory space, but terrible in that I waste a lot of time trying to figure out where everything is! So to combat this in the future, this blog post is mostly for future me. This relates almost exclusively to the Amazon Linux 2 AMI. If you run other flavors of linux, your mileage may vary! First, I can rarely remember the names of running services. To list running services: systemctl --type=service --state=running The result is a list where I can see, for example, the crontab is called crond. I know this can be looked up elsewhere, but usually I've made a change like to the global environment variables, and need to restart the crontab. Restarting is systemctl restart <servicename>. I get this order wrong because it used to be service <servicename> restart. Related to this

VIM tab autocomplete for .class files

 VIM tab autocomplete for .class files Super frustrating to track this down on a new instance at AWS. The instance is using the Amazon Linux 2 AMI, and Google (or Chat GPT) didn't help find the settings file. I'm adding this blog post so that in the future, I can find it here! This is the file location: /usr/share/bash-completion/bash_completion The line to edit (I just searched in vim for class): _install_xspec '*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)' vi vim gvim rvim view rview rgvim rgview gview emacs xemacs sxemacs kate kwrite Obviously, I just need to remove "class" from that list. We no longer name files with .class, mostly because of this issue! All the legacy code, however, that we use for dealing with older systems does.