This post is to serve basically as long term memory for me. I keep forgetting how to do this, and the original post I used to refer to is gone. (Well, at the time of this writing it is). That said, WaybackMachine is awesome and I was able to access the archived original post there.
However, for ease, I’m just going to repeat the steps here because it’s easy enough to do.
Install the right Java Version
As of this writing, the TrueNAS Scale MineOS App, does not come with Java 21 pre-installed. Every time the MineOS App is updated, Java 21 is blown away. So, you have to re-install it in the MineOS App Container.
Step 1 – Access the MineOS App Shell
Step 2 – Run apt update
Step 3 – Run apt install openjdk-21-jdk
Start The Servers
Ok – now that you’ve updated the java version, you can go in and start your MineOS servers.
Visit the Server page
Select the correct profile from the Server Actions box. (i.e. 1.21.4)
Select the correct runnable jar from the Java Settings box (i.e. minecraft_server.1.21.4.jar)
Push the big green Start button
Wait a bit and you should see the Server status checkbox flip from a red “Down” to a green “Up”
Here’s a couple screenies to help you get your bearings.
So, one of the most annoying things IN MY LIFE has been when JetBrains started adding all of this random AI Assistant autocompletes to their IDE’s. I know I’m not alone, because there are even tickets like this one, How to Shut Off All this AI Crap?.
It’s not that I’m anti-AI – I’m anti-Intrusion. When I’m driving the car, I get to drive the car, not the AI Assistant. Unfortunately, the way JetBrains is adding AI into it’s editor feels very intrusive. And, also unfortunately, it’s a slog to go through all of the IDE settings to try and find every single little thing that needs to be turned off.
Luckily, you don’t need to! JetBrains has added some files that will allow you to selectively use AI tools. My favorite is dropping a .noai file in your project root. It’s easy to do, navigate to your project root in Powershell and run touch .noai. That’s it, all you need is an empty file to disable all the AI stuff in PHPStorm.
Now you can get back to PHPStorm Classic mode. LFG? Molten Core? … oops wrong classic mode.
But what about Junie?
That’s a valid question. Like I said, I’m not anti-AI. I actually like the coding agents, I’ve found them extremely helpful in certain circumstances. So, I wondered, will .noai disable all coding agents? Nope! It won’t. As of this writing .noai will disable the AI Assistant features in the IDE – but you can still use the Junie agent window. I don’t know if that’s an oversight or not, I actually recently heard that the Junie agent window is going away as they consolidate underneath the AI Assistant chat window.
The Better Junie Option (imo)
The better option, in my opinion, is to just use the Junie CLI. It’s currently in beta, and appears very usable from my testing. It’s integrated with your current JetBrains AI pricing model, so if you pay to use Junie within your IDE, then you are paying to use the CLI tool as well. I’ve found that I can open my own custom terminal, or use the built in IDE terminal, and open Junie via CLI. This gives me the best of both worlds, a powerful IDE and a powerful coding agent. I can use both when I want.
Not Quite .noai
Despite .noai working in most circumstances, I’m noticing little bits of AI crop back up. For example, inline Code Completion. I’m wanting classic intellisense, but JetBrains is giving me inline completion using cloud and local models. I had expected this to not happen, and indeed thought it wasn’t happening. But today, as I’m coding, I noticed phpstorm giving me ghosted AI completion hints. So, I navigated to phpstorm settings Editor > General > Code Completion > Inline and unchecked the Enable inline completion using language models: option.
As you might know, I’ve set up a RocketChat server recently on Digital Ocean. So far it’s been working great. An update every once and a while is all it needs.
However, yesterday, I attempted an update that failed. From then on every attempted update resulted in “RocketChat server not running. Cancelling”. This was very frutrating.
First, a few commands to try that might help:
systemctl restart rocketchat.service – This will start your RocketChat server in case it is stopped.
systemctl status rocketchat.service – Use this command to check the results of the previous command. Typically this will report that the service is “Active” if the previous command was successful.
In my case, the second command resulted in a “failed” state. The command itself gave me some information as to what the failure was, but not a lot of context as to what caused the failure. However, it did show me the process that it attempted to run. It said, ExecStart=/opt/nvm/versions/node/v14.19.3/bin/node /opt/Rocket.Chat/main.js (code=exited, status=1/FAILURE).
Alright! We’re getting somewhere. With that I was able to figure out what command failed and where that command was run. I navigated directly to the /opt/Rocket.Chat directory which was where the failure was occurring. From here I ran node main.js. The results of this command were much more helpful. They told me this, Error: Cannot find module '@meteorjs/reify/lib/runtime'. That looks like an issue with npm dependencies.
So, I poked around the Rocket.Chat directory structure and looked for dependencies for the Rocket.Chat server. I found what I was looking for in the /opt/Rocket.Chat/programs/server directory.
From this directory I ran two commands
npm install
npm ci
Afterwards I attempted to start the RocketChat server again using the systemctl restart rocketchat.service command. I checked it with systemctl status rocketchat.service and found that it was working now! RocketChat was back to running normally. The problem with “RocketChat server not running. Cancelling” was gone!
Note – RocketChat is making moves to severely limit their PAAS offering. They have baked in a bunch of limitations in the codebase and now claim that if you self-host you are using their “free version” ?
RocketChat (https://rocket.chat) is a chatting tool similar to MatterMost and Slack. It offers a self-managed community edition as well as some paid plans and is in active development. I’m just learning how to use it, so I’m planning on documenting my journey here.
I installed and set up RocketChat installed in a matter of minutes. The QuickStart guide, though short, includes most of what you need to get up and running.
To get started with your RocketChat instance on DigitalOcean you need to:
Create an A Record that points to your Digital Ocean Droplet. *
Setup your Let’s Encrypt certificate. rocketchatctl configure --lets-encrypt --root-url=YOUR_DOMAIN --letsencrypt-email=YOUR_EMAIL
Update your RocketChat installation. Run the following commands from your droplet command line interface.
Run sudo rocketchatctl upgrade-rocketchatctl
Run sudo rocketchatctl update
* I use Cloudflare to host my DNS. In this case I had to disable the proxying on the A Record in order to allow RocketChat to work correctly.
Now visit your site (you should not run into any problems) and create your administration account.
One Note
From time to time the Rocket Chat server responds with “Bad Gateway”. I’m not sure exactly why. However, a DigitalOcean droplet can be restarted by using the reboot command from the command line interface.
I had need to get a list of a simple list of all commits for the Current branch. This approach was simple enough and gave me what I wanted. I modified it to just use HEAD so that I can easily run it against the current branch.
Every once and a while I want to validate the hash of a downloaded file. Most of the time these are MD5 hashes, but I’ve seen SHA as well.
Windows actually has a couple built in ways of generating the hash of a file. You can use certutil or, in powershell you can use get-filehash.
With Certutil
To verify a checksum with certutil use the following command: certutil -hashfile {FILENAME} {ALGORITHM} replace the FILENAME and ALGORITHM with your choices.
With get-filehash
This is my preferred method. No reason, maybe I like the order of arguments better?
Use get-filehash -algorithm {ALGORITHM} {FILENAME}.
First things first, I tend to build up a lot of local branches. No, I don’t pro-actively remove them from my machine. (Who does that extremely smart thing? ?) At work we use GitHub and Windows. As such I use posh-git to perform almost all my git interactions (you should too cause it’s ?).
Our current process is:
Create Feature Branch
Create Pull Request
Squash and Merge Pull Request
Delete Feature Branch from Remote
Any developer can have any number of feature branches out at a time waiting to be merged. As we are using a “Squash and Merge” process our branches are not *actually merged*. We delete the original branch after the squash.
But that doesn’t really matter to you. Come to think of it, it doesn’t really matter to future me. What does matter is, how can I remove local git branches that aren’t on the git remote anymore? (Remote meaning GitHub, Gitlab, Bitbucket, etc…). No, we aren’t talking about the remote tracking branches that are removed by pruning. Otherwise, one could just prune, no?
I continuously search for this, so I’m documenting it here so I NEVER HAVE TO SEARCH EVER AGAIN ?
If you are in a position where you Squash & Merge then you will need to replace the git branch -d with git branch -D. This will successfully remove all “:gone” branches from your local machine.
Any git branch you have checked out essentially has three branches. 1. The remote branch on GitHub 2. The remote tracking branch on your machine 3. The local branch you do your work on.
When we push a feature branch live (merge a pull request) we delete the “remote branch on GitHub” (#1 above).
When we run `git fetch origin –prune` we remove the remote tracking branch (taking care of #2) above.
However, taking care of #3 above often requires manual clean up. That’s where the piped command above comes into play, it takes care of cleaning up branch #3.
I find it extremely useful to include surrounding lines when I’m searching through log files or whatnot for a string of text. It certainly helps provide some context as to what I’m looking at.
However, I constantly forget the flag for including surrounding lines. So I’m posting it here so that, at least when I forget, I know where to find it ?
The flag is -C. I suppose it should be easy to remember since I want “Context” and “Context” begins with “C”. ?
Below is a quick example for just in case you want the whole command or you enjoy copying and pasting all the things – hey… no judgement here.
It’s been about seven months since I setup a Wireless GitLab server. Since then I’ve figured out how to list updatable packages on Ubuntu Server. I’ve also performed several updates using sudo apt-get update && sudo apt-get upgrade.
gzip: stdout: No space left on device
Today I ran into a new problem. Upon trying to perform an update I was presented with a peculiar error. It said gzip: stdout: No space left on device and it told me to run apt-get -f install to fix things up. So… that’s what I tried doing. I tried running the apt-get -f install command but to no avail. The command would not complete successfully.
This is about the time when I start getting really annoyed with Linux and the command line and all the things associated with configuring things manually like do I really need to download the entirety of the Linux MAN files inside my HEAD? DO I NEED TO DO THAT? GAHasldkjsadljfsadfsdsdf!!!!
Calm yourself.
The /boot partition is 100% full
Ok, so it turns out that the apt-get process can fail if the /boot partition becomes 100% full. There were a number of suggestions online that indicated you needed to clean out the /boot partition by removing old linux-images that you don’t need anymore. Many of these suggestions involved using sudo apt-get remove [package-name] or using sudo apt-get autoremove which are both completely valid options… IF APT-GET WERE WORKING. But apt-get is not working, that’s the problem.
So… I Googled a lot and dug through a lot of forums. Finally I stumbled on this uber helpful answer on askUbuntu. I’ll go ahead and paraphrase the answer below so that I can easily find it again. Yes. This is all about me.
Cleaning up the /boot partition
In the case where your /boot partition becomes totally full you can use these steps to clean it up. (From flickerfly on AskUbuntu).
Run the following command to get a list of the linux-image files that you don’t need anymore.
Create a command to remove the folders you don’t need anymore. You can do that with a command like this (where brace-expansion is used to save keystrokes). Use the output from the command above to build your command.
EXAMPLE
sudo rm -rf /boot/*-3.2.0-{23,45,49,51,52,53,54,55}-*
Now that apt-get has space to work with you can actually run sudo apt-get -f install to clean things up.
Use Purge to manually resolve issues with “Internal Errors” (if you get any internal errors).
EXAMPLE
sudo apt-get purge linux-image-3.2.0-56-generic
Run `sudo apt-get autoremove ` to clean up anything orphaned by the manual clean.
Now you can finally proceed with those updates you were wanting to do.
Psst… tl:dr -> rebooting my wireless router fixed the problem.
A few months ago I setup a wireless Gitlab server. This server has been working great. Once in a while I check up on it via SSH and make sure it’s updated. Otherwise, I leave it alone and it’s happy.
That is until today.
Secrets were required, but not provided
Today, for some reason, I could not access my gitlab server via the web interface or push to it via the git cli. In fact, I couldn’t even SSH into it. I had to pull out the ol’ physical monitor and keyboard and MANUALLY connect. Shudder.
First thing I do upon connecting to the server is try to ping google.com of course. It didn’t work. The server could not find the address for Google, and as anyone knows, if you cannot find Google then the internet does not exist. Plain and simple. You might as well be trying to fly a kite in the Marianas trench.
Now, up until this point I’ve had no issues connecting to the internet. The server automatically connects to the WIFI no big deal. However, I thought that maybe the network authorization expired or something? Maybe I can only connect for a few months at a time before re-authenticating. So I tried just that. I whipped out my old friend nmcli and ran:
This is when I see the dreaded Secrets were required, but not provided response. Well – I’m not sure what secrets it wants me to tell it but I mean, the password was right, and I’m certainly not telling it who my favorite little pony is or even if I like little ponies.
I tried several more times, I tried rebooting the server. Nothing worked. It was at that point that I, using another computer, logged into my wireless router and told it to reboot. Several minutes later everything is fine.
Rebooting my router fixed the problem
Why? I don’t know. There has been some talk that some routers will auto select channels that some linux machines do not like. I think that was likely the original issue. Rebooting the router worked because another channel was selected. In any case… long story short. If you are having issues with your wireless server not connecting to your network then try rebooting your router.