23 Aug 2014

Magnifier in Chromebook

Off lately I've started to use the C720 (one of Acer's first Chromebooks) and am I in love with it or what.

While using the Chromebook to view an online Training that was created in a Flash environment (probably using Adobe Connect) I couldn't help myself get frustrated with the fact that I can't do simple things such as Zoom-in on the training video (which happened to be a Shell session) and had to really concentrate on a small part of the screen to read what the font wanted to say.

Most browsers that aren't from the prehistoric era, support zoom-in / zoom-out but the presentation application is 'smart' enough to ensure that that doesn't work as expected. So although the HTML does get enlarged but the presentation stays the same size (just re-centered) to the new zoomed in/out screen space.

A second option (I knew existed in Ubuntu since its early days) had a nifty feature for these situations, where you could just zoom-in and enlarge the screen (unbeknownst to the browser and all applications below the UI layer) this meant that anything rendered on the screen was magnified.

Now Chromebook was smart, pretty compact and an awesome little product, but I really thought expecting graphics related jugglery would be an overkill... and I couldn't find such a feature either.

... Until I read the 'Accessibility' feature in Chromebook (which is a simple little checkbox) and Voila!

Steps:

  1. Click User-Image (bottom right)
  2. Click Settings
  3. Click 'Advanced Settings'
  4. Under 'Accessibility' options -> Enable Screen Modifier
  5. Zoom-in using .... Ctrl-Alt- button
  6. Zoom-out using .... Ctrl-Alt- button
Am still to find things that I can't do on this ultra-cheap / ultra-light / long-lasting-battery / neat laptop!

12 Jul 2014

A Life ... that just happens to have a name.


Zohra Sehgal (1912-2014)

Ae kafir, qadr ki qadr na ho to na sahi,
Ae nadaan, Umr ki fikr na ho to na sahi,
Gar ranjish ho is sadi se ya pichla koi,
To rukh kar, Ja ban ke dikha Zohra koi.

25 Apr 2013

PgAdmin doesn't (directly) support restoring from PLAIN format backups (yet)


Was working with my team at office recently and had a request from the team to learn how to 'Restore' an existing backup using PgAdmin. I thought this was easy, since PgAdmin allows for both 'Backup' and 'Restore' but investigating further, I found that PgAdmin only allows for Restore in formats other than 'PLAIN'.

Cross-checked this on the internet and found references here, here and here saying the same thing. 

PgAdmin doesn't (directly) support Restore'ing from plain text backups. To restore a backup, backed up using PLAIN format, you'd need to pass it through a command line utility called 'psql' that is available in both PgAdmin as well as postgres server installations.

I think it's high time that PgAdmin support this feature, especially when all the building blocks are already in-place. Lets see if I could take out time and submit a patch for this.

... till later.

27 Mar 2013

Christian Marriage Registration (Delhi, India)

(Please scroll down to the read the entire-post to know more)



Documents required for Christian Marriage Registration
(a.k.a. Documents required for Solemnization and Registration of Marriages under Indian Christian Marriage Act, 1872)

Workflow to get your Christian Marriage
Registered with the Delhi Government

28 Jan 2013

Setup Ubuntu for PostgreSQL Development (from tarball)

This very brief article is a primer for those wanting to start developing on PostgreSQL (on Ubuntu 12.10):

Getting Ubuntu ready for (PostgreSQL related) development

  • sudo apt-get install build-essential
  • sudo apt-get install git
  • sudo apt-get install libxml2-dev
  • sudo apt-get install libxslt-dev
  • sudo apt-get install autotools-dev
  • sudo apt-get install automake
  • sudo apt-get install libreadline-dev
  • sudo apt-get install zlib1g-dev

Get Postgresql source

  • Download: http://ftp.postgresql.org/pub/source/v9.2.2/postgresql-9.2.2.tar.bz2
  • tar -jxf postgresql-9.2.2.tar.bz2
  • ./configure
  • make
  • make install
If you want to know more about hacking on PostgreSQL in general, you could always refer to the (very) detailed PostgreSQL Developer FAQ:
Happy Hacking :) ! 

6 Dec 2011

Setup Linux for PostgreSQL Development (from Git)

This very brief article is a primer for those wanting to start developing on PostgreSQL:

Getting your Linux (Ubuntu / CentOS) machine ready for (PostgreSQL related) development

Ubuntu: sudo apt-get install build-essential git libxml2-dev libxslt-dev autotools-dev automake libreadline-dev zlib1g-dev bison flex libssl-dev libpq-dev 

CentOS: sudo yum install git libxml2-devel libxslt-devel automake autoconf readline-devel zlib-devel bison flex gcc openssl-devel

Get Postgresql source (from Git)

  • git clone git://git.postgresql.org/git/postgresql.git
    • Would take some time (~1-15 minutes) but YMMV
  • ./configure --prefix=/opt/postgres/master --enable-depend --enable-cassert 
  • make -j4
  • sudo make install
  • cd contrib
  • make -j4
  • sudo make install
  • /opt/postgres/master/bin/initdb -D /opt/postgres/master/data
  • /opt/postgres/master/bin/pg_ctl -D /opt/postgres/master/data -l logfile start
If you want to know more about hacking on PostgreSQL in general, you could always refer to the (very) detailed PostgreSQL Developer FAQ:

Happy Hacking :) ! 


git checkout REL9_6_STABLE && git pull && ./configure --prefix=/opt/postgres/96 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/96

git checkout REL_10_STABLE && git pull && ./configure --prefix=/opt/postgres/10 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/10

git checkout REL_11_STABLE && git pull && ./configure --prefix=/opt/postgres/11 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/11

git checkout REL_12_STABLE && git pull && ./configure --prefix=/opt/postgres/12 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/12

git checkout REL_13_STABLE && git pull && ./configure --prefix=/opt/postgres/13 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/13

git checkout REL_14_STABLE && git pull && ./configure --prefix=/opt/postgres/14 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/14

git checkout master && git pull && ./configure --prefix=/opt/postgres/master --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/master

Setup Ubuntu for PgAdmin Development (from Git)

This article is a primer for those wanting to start developing on PgAdmin on an Ubuntu 12.10.

Getting Ubuntu ready for development

  • sudo apt-get install build-essential
  • sudo apt-get install git
  • sudo apt-get install libxml2-dev
  • sudo apt-get install libxslt-dev
  • sudo apt-get install autotools-dev
  • sudo apt-get install automake
  • sudo apt-get install libwxgtk2.8-dev
  • sudo apt-get install libssl-dev

Install PostgreSQL Database

  • Click here for detailed steps.

Get PgAdmin source

  • mkdir pgadmin
  • cd pgadmin/
  • git clone git://git.postgresql.org/git/pgadmin3.git
    • Would take some time (~10 minutes) but YMMV
  • cd pgadmin3/
  • bash bootstrap
  • ./configure
  • make
  • make install
These steps should give you a freshly compiled PgAdmin3 binary, customized for your system.

What's in an empty table?

How much storage does an empty table in Postgres take? This is a post about Postgres tables that store ... well basically ...  Nothing . The...