This weekend, I spent some time moving from using i3 under X11 to Hyprland under Wayland. While I was doing that, I was exploring using Code on my dotfiles to help me speed through learning the formatting and syntax I needed to get some parity with my old setup.
I'm just going to be brutally honest; I do not for the life of me, from a user standpoint, understand why I should prefer Wayland.
Llama 3.1 is not too bad at the work I'm doing. I got reasonable answers from it with only a few hallucinations.
I use Obsidian, and being able to jump from a Task there right into a chunk o' code would be nice.
In IntelliJ, you can right click a file and choose: Copy Path/Reference, and then Toolbox URL.
However, Windows doesn't know how to open those. You can teach it, though.
To set Windows 11 to open a URL with the "jetbrains://idea/navigate" scheme in IntelliJ IDEA Ultimate, you'll need to register the custom URL scheme in the Windows registry. Here are the steps:
Open the Registry Editor:
- Press
Win + R
, type regedit
, and press Enter.
Navigate to the URL Protocols:
Create a New Key:
- Right-click on
HKEY_CLASSES_ROOT
, select New > Key
, and name it jetbrains
.
Set the Default Value:
- Select the
jetbrains
key, and in the right pane, double-click on the (Default)
value. Set it to URL:JetBrains Protocol
.
Create a URL Protocol String:
- Right-click on the
jetbrains
key, select New > String Value
, and name it URL Protocol
. Leave its value empty.
Create a Shell Key:
- Right-click on the
jetbrains
key, select New > Key
, and name it shell
.
Create an Open Key:
- Right-click on the
shell
key, select New > Key
, and name it open
.
Create a Command Key:
- Right-click on the
open
key, select New > Key
, and name it command
.
Set the Command Value:
- Select the
command
key, and in the right pane, double-click on the (Default)
value. Set it to the path of your IntelliJ IDEA executable, followed by the URL parameter. For example: "C:\Program Files\JetBrains\IntelliJ IDEA 2023.1\bin\idea64.exe" "%1"
After completing these steps, Windows should recognize the jetbrains://idea/navigate
URL scheme and open it with IntelliJ IDEA Ultimate.
Thanks again Copilot.
The examples provided in "Learning Postgres" for Window Lag/Lead functions in Chapter 6 really don't do a good job of selling you on expending the effort into learning them. Here are some better ones.
Let's say you want to align today's sales totals and yesterday on the same row.
SELECT
sale_date,
sales_amount,
LAG(sales_amount, 1) OVER (ORDER BY sale_date) AS previous_day_sales
FROM
daily_sales;
.. or, you want to know how much more or less today's tally ended at.
SELECT
sale_date,
sales_amount,
LEAD(sales_amount, 1) OVER (ORDER BY sale_date) - sales_amount AS next_day_difference
FROM
daily_sales;
This one is a lot of fun. I have a list of dates. I want to know if there are days missing in that sequence.
SELECT
sale_date,
LEAD(sale_date, 1) OVER (ORDER BY sale_date) AS next_sale_date,
LEAD(sale_date, 1) OVER (ORDER BY sale_date) - sale_date AS gap
FROM
daily_sales;
So today I learned that there's a -c parameter on the md5sum command:
md5sum -c checkfile.md5
This will use the output from a previous run of md5sum piped out to flat text to validate that the files defined in that file match.
Sounds simple if you took the time to read the man page. I hadn't, and so now I have to laugh at myself for the oddball workarounds I've done after not having read it.
Same applies to a recent read of 'Learn PostgreSQL' by Ferrari and Pirozzi. I read about Window functions, but when I originally read about rank()
, I stopped reading, when it turns out that first()
did I wanted with less lines of code.
So what I really learned (for probably the ten thousandth time) is don't stop reading.