Month: October 2021

Create Postgres replica on separate server over the network

A database replica is able to provide another layer of protection in case of the main database server going down.

Postgres has this capability out of the box.

In this case the requirement was to create a replica on a separate server. (It’s also possible to create it on the same server where Postgres is running).

The replica maintains an exact copy of the main database (called Primary) on a real-time basis.

Continue reading

Run Postgres exposed to the internet

Although this is not recommended, there might be scenarios where there are no other options.

An example is an analysis software which doesn’t give the capability to connect via SSH. I came across this scenario when someone wanted to use QLik. Although this has a lot of capabilities, but when something like this is required, I’d rather use the open source and free Metabase.

Continue reading

Backup / Restore Postgres, MySQL, SQLite database using Sequel

Sequel is a fantastic ORM available in Ruby.

It also comes with an IRB console so it can be run directly from the command line with various options.

For example, to console into an SQLite database testdb.sqlite in the current directory –

$> sequel sqlite://testdb.sqlite

Or for Postgres –

$> sequel postgres://dbuser:dbpassword@localhost/testdb

However, I use sequel most frequently to take quick database backups or to restore them.

Continue reading

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

Copyright © 2024 the möbius trip

Theme by Anders NorenUp ↑