Page 6 of 10

Install and run Metabase

Metabase is a data analyzer and visualizer tool which can connect to many types of databases.

It can do some smart analysis as well as let you write proper SQL queries to create charts and graphs.

Metabase is a Java application which can be run directly. Conversely, it can also be run via Docker.

Continue reading

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

Copyright © 2025 the möbius trip

Theme by Anders NorenUp ↑