Rails is not ruby

I had written earlier how learning the language before the framework is more important. It is important to know which parts is part of the language, and which comes from the framework. This becomes more important when there are defacto web frameworks (rails in ruby, django in python, phoenix in elixir.. maybe more) For a newcomer who is learning both the language and framework together (or back to back, or worse learning the language via the framework tutorials :shudders: )

Continue Reading »

Trying Macports

I was aware of macports for quite some time (since I moved to macOS about 8 years ago) But most of the tools seem to be suggesting brew install, so I didn’t give macports a second thought. 8 years later, my MBP is old, and soon will not be supported by Apple and brew While I upgraded to macOS monterey, this is going to be last version supported on this hardware.

Continue Reading »

Interesting Netlify Build Problem

After build problems with my PKM site, today I ran into another problem with this site. What puzzled me was Deploy showed Build step failing but no useful error (other than exit code 2 - which does not help much) But in the process of debugging, I learnt 1 about the environment variable NETLIFY_BUILD_DEBUG (set to true when needed) It did not help 😞 I also upgraded hugo version (which is another environment variable) in the process.

Continue Reading »

Pass request specific context to Sidekiq

In a multi-tenant rails application, usually we extract the tenant, before we process it further. Sometimes, the process requires us to process the data in background (via Sidekiq) and because the background job also needs to query the DB, it also needs to set tenant. Turns out, we can pass “some” data from the controller to the sidekiq job via ActiveSupport::CurrentAttributes While, sidekiq may need to set the tenant again (for more DB queries) but one can save at least one query (to find out the account itself)

Continue Reading »

Migrating PKM Site : Updates

As mentioned here and later here I recently moved PKM from Dendron to obsidian-zola The original code seems abadoned (No updates in little over a year). I understand this since it is likely built for personal use, and it works for them (FWIW, the demo site itself is not updated for exactly same duration) Turns out people forked it and improved it. At first I tried this fork, renamed as obsidian-zola-plus (as it made it better than the original) This one seemed active (updated little over 2 months ago.

Continue Reading »

Rename File in Emacs

First impression people have is that Emacs is an editor. So in an editor one should just save as to different name/path. 1 But save as is different from renaming a file. save as creates a copy of the file with a different name/path. So one has two files with old and new paths. But rename leaves just one file at thenew path. Older versions of Emacs (< Emacs 26) did not have this functionality built-in So either one had to use dired or people wrote their own functions.

Continue Reading »

Read from Dead Letter Queue

As mentioned in the earlier post, at work I was “strongly encouraged” to use Azure Service Bus, instead of RabbitMQ Unfortunately SDK has FormatDeadLetterPath functionality but it is not available to HTTP REST API 1 Append /$DeadLetterQueue to the queue name.2 Refer to this SO comment Readers would remember that since Ruby is not officially supported by MS, we had to resort to using REST API to access the Azure Service Bus functionality.

Continue Reading »

→ New PKM Site

Finally migrated my PKM from Dendron to Obsidian-Zola

Things I needed to do were :

  1. Remove Dendron specific frontmatter
  2. [In Progress] Restructure flat file names that were like Dev.DB.mysql.md to Development/Databases/mysql.md
  3. Pushed this branch as main
  4. Make main as default and protected branch
  5. Unprotect master
  6. Renamed old master as dendron (just in case)- without unprotecting old master I could not rename it.
  7. Remove Dendron specific settings from netlify. Since this time there is netlify.toml so no additional settings needed.

I would say it was pretty smooth transition 😄

Considering migrating PKM Site

My PKM is currently based on Dendron Main appeal of Dendron was local-first. At the same time, it indeed was loosely tied to VSCode editor. Over the years, they had a command line tool to create new notes. Still, its strength always was as a VSCode plugin Then today, I came across Obsidian-Zola It splits the task of taking notes and publishing it. Obsidian for note taking Zola for publishing What I liked about it is Search functionality (To be fair, my current PKM build on Dendron also has it)

Continue Reading »

Emacs Glasses Mode

Now that I’m working on .NET and C#, I enabled csharp-mode in Doom Emacs. While exploring minor modes related to csharp-mode, I came across Glasses minor mode. Here is the EmacsWiki page. TL;DR: The default setting is to separate the Capped bits with an underscore, so EmacsIsStudly shows as Emacs_Is_Studly. I too, prefer to see the code as-is, but it is good to know that Glasses mode exists. I can see it being useful.

Continue Reading »