Page 5 of 10

ExtJs – Bindable allowBlank

ExtJs does have a attribute for required by the allowBlank configuration against fields.

However, this configuration doesn’t have a setAllowBlank or a getAllowBlank method, because of which, it is not possible to bind those fields via the viewModel. So, usually, those fields have to be somehow fetched in the Controller and then that attribute.

This situation can however be remedied very easily.

Continue reading

ExtJs – Monthfield Picker

ExtJs, by default, doesn’t provide a month picker.

A monthfield picker allows you to choose specific months only.

The customization that was required, was to have a start date and an end date for those months, so that at the end of the operation, those specific dates could be saved.

Continue reading

setup Tiddlywiki with NodeJs server

I’ve always been fascinated by TiddlyWiki, which is considered a personal wiki and non-linear notebook (Wikipedia).

The main reason that was holding me back from using it was that every time I make changes, I would need to save it explicitly or use some browser extension.

I then discovered a very nice Tiddlywiki server on NodeJs (link).

I also wanted this to be password protected and this server provides simple and easy ways to do all that.

Continue reading

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

Copyright © 2024 the möbius trip

Theme by Anders NorenUp ↑