Sometimes it is said that notes are write-only i.e. No one reads them later 🤷‍♂

The same happened with me today.

I was looking for way to get only certain file from git stash

I asked ChatGPT with mixed results. (It provided correct answers, but more verbose. On asking, better explanation was provided, still..)

During such time, stackoverflow shines.

Even without going to SO site, the answer is included right on the search results.

I decided that since it was hard to find, it is worth adding it to PKM.

Turns out I already had it stored

🤦‍♂🙈

That is why it is called write-only 😆

I came across fish like auto suggestions plugin for zsh. When I started to update that, I noticed that my oh-my-zsh is two years old (now that we are near the end of 2022, it is more like close to three)

So I uninstalled and reinstalled oh-my-zsh

But the prompt won’t look nice.

That is when I realized that starship is not hooked to zsh

and that starship is also due for an update (6 months)

So upgraded starship and then hooked it up to zsh

Now I can try the autosuggestions plugin. ☺️

Emacs Mode in Shell

I have been using Emacs for several years now. But I switched to (and stayed with) Emacs only because of evil mode. I had been vi user for decades before that. Even today, I use (Neo)vi(m) occasionally. Right now, I’m writing this in Helix editor, which is lot closer to modal editing of vi, than of Emacs. So there. I am aware that various shell support vi mode, but the default is Emacs.

Continue Reading »

Firefox Test Dark Mode

My previous theme indiefeed supported both light and darkmode. The current one does not. I’m in the process of fixing that. But I didn’t know how to test it ? i.e. Depending on the time of the day, Firefox would either select light mode or dark. Turns out, Developer tool lets you switch it (for that page). When in Inspector tab, look for icons for Sun (light) and moon (dark).

Continue Reading »

How to Support Both Light and Dark Mode for your app

Add something like the following to your css @media (prefers-color-scheme: light) { body { background-color: #f0f0f0; } } @media (prefers-color-scheme: dark) { body { background-color: #0f0f0f; } } I’m just learning this. But this above doesn’t look scalable. My previous theme, defined colors as variables, per color-scheme and in the other css, use these variables instead of actual colors. That way, you need to modify colors only at one place 🎉

Continue Reading »

D2 Layouts

D2 allows me to generate diagrams from the same source file using different layouts It comes with two built-in layout engines : Dagre is the default : Other one is ELK This needs to be specified explicitly as : D2_LAYOUT=elk d2 in.d2 out.svg and here is the output

D2 : A modern diagram scripting language

I came across D2 on Mastodon I think. (Like most things. But I can’t find the original toot 🤷‍♂) I used mermaid.js earlier. In fact, I also added mermaid support for this theme. Benefit of Mermaid is that since it is generated by mermaid.js, I don’t need to save and include the image in my blog (and worry about mismatched filename and/or path, resulting into broken image.) On the other hand, not many hugo themes support mermaid, but link to an image is supported by hugo and every other SSG.

Continue Reading »

Beggar

Yesterday, after I came out of a shop, some elderly woman was begging. Near that shop, it is not uncommon. She did not look like a beggar. Yet she was. At first, I gave her Rs. 50 - which maybe more than what people usually give beggars (I think). I was surprised that she said I don’t want money, I want rice and daal (lentils) instead. I was positively surprised. Not many beggars ask for things.

Continue Reading »

Insert timestamp anywhere using Espanso

I wrote about Espanso long time ago. I have been using Espanso since then. Recently, I had a need to add timestamp in a note. Espanso already comes with a trigger to insert date via :date. As the name suggest, it just inserts the date. So I added the following to the match/base.yml file. - trigger: ":timestamp" replace: "{{timestamp}}" vars: - name: timestamp type: date params: format: "%b %d, %Y %I:%M%p" As might be obvious, now I get timestamp just by typing :timestamp anywhere.

Continue Reading »

I just used externalUrl feature of this theme. It is kinda cool.

Such post is indicated with a right arrow like →

The title of the blogpost itself is an external link. So when clicked, it does not open the post, but the external URL.

In order to open the post, either click the infinity symbol next to it, or the date (if on the yearly list page)