Author: abhijit

error while running rake task – “Don’t know how to build task”

The default method to pass arguments to Rake tasks is to give the parameters in square brackets –

desc 'Method #1: Use the default rake way to add two numbers and log the result'
task :add, [:num1, :num] do |t, args|
  puts args[:num1].to_i + args[:num].to_i
end

Reference: 4 ways to pass arguments to a Rake task

$ rake add[1,2]
# => 3

However, I would rather pass the arguments like this –

$ rake add 1 2
# => 3
Continue reading

Setup up READ_ONLY users on Postgres

To grant access to users for only viewing a database (i.e. no INESRTs or CREATE or UPDATE access) there are certain conditions.

First, access should be only allowed through ssh.

Second, the ssh user should not be able to get into a shell directly.

And finally, the database should restrict access to that particular user with relevant permissions.

Continue reading

PM2 – the best process manager

In the past, on my server I’ve installed Fossil, Syncthing, Bitwarden, Inlets. All these require some form of Process Management. These programs / processes / services need to be always running, so they are restarted in case they get terminated. Also, on a system restart these need to start up automatically.

I’ve mostly used Systemd or Supervisor to all these things.

However, I recently came across PM2 and I was really blown out of my mind as to how simple it was to set it up.

Continue reading

Upgrading Wallabag from 2.3 to 2.4

I had upgraded PHP from 7.2 to 7.3 on my server and suddenly Wallabag stopped working!

I got some weird error like –

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted

I guessed it had something to do with the PHP upgrade. So, I decided to upgrade Wallabag as well.

That’s when the problems started!

Continue reading

Simplest JavaScript & CSS minifier – YUI Compressor

I was looking for a simple JavaScript / CSS minifier. Essentially, a program which will

  1. minify – remove empty lines
  2. obfuscate – shorten variable names

There are many online tools available of course. Of the new ones, Parcel was the best. However, the resulting files had some extraneous code which I could do without.

Then I remembered about YUI Compressor, which I think is one of the first ones introduced many, many years ago.

Continue reading

SQLite load test for concurrent transactions using JMeter and JDBC Connection

I came across this article via a Hacker News post. This mentioned that SQLite was able to handle –

400 write transactions per second, and thousands of reads

I’ve recently started implementing applications with SQLite and with journal_mode set to WAL so that multiple concurrent writes could be done. However, I was curious to confirm the concurrent transactions number.

Earlier, I have used SQLite for development but usually on production we would face challenges with the notorious Database is locked error, we would move to Postgres or MySQL. However, I’ve always felt that for 90% of the applications we create don’t require these and was keen to back it up with numbers.

So, I decided to use Apache JMeter to try load testing a sample application.

Continue reading

VSCode terminal tab completion issue

I had logged into my server using VSCode the Remote-SSH extension, and had opened the terminal.

When I enter the ls command and tab, the files and directories auto-complete. However, when I give the mv command, tab completion fails.

After some googling, this Stackoverflow answer helped.

In my .bashrc file, I had to add the following lines –

# enable bash completion in interactive shells
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

moving from LastPass to bitwarden using vaultwarden (bitwarden_rs)

I have been using LastPass for password management since like forever.

I became a paid customer in 2014. It was initially $1/month. Then it got hiked to $2/month and currently it stands at $3/month. That’s $36/year which was working out too much for me.

Furthermore, the free option is limited to a single type of device. Since I wanted to use it across desktops and mobiles, there was no option except for the $3/month plan.

I had been looking at bitwarden for quite some time now but read that it’s too resource heavy. I then came to know of biwarden_rs which is a rewrite of bitwarden in Rust and compatible with upstream Bitwarden clients. I had then forgotten about this for some time until I head the news of it being renamed to vaultwarden via a Reddit thread.

Continue reading

Copyright © 2025 the möbius trip

Theme by Anders NorenUp ↑