Thursday, November 12, 2015

Update in PostgresSQL Using the Command Line Tool - PSQL

The command:

psql -d database -U username -W -h hostname -f script-file-name.sql


-W - to request psql to ask for password (rather then assume no-password)-h  - PostgreSql server host name or ip
-f  - file with the SQL script to execute on the database

Wednesday, October 28, 2015

Install Puppy Linux on my Old ThinkPad R60

Version: Slacko Puppy 5.7

  • Problem: Wi-Fi not working. Solution:
  • First: rfkill list
  • if it says softblock yes, try Fn F5. If it doesn't help do: sudo rfkill unblock wifi; sudo rfkill unblock all
  • Then:

# cd /lib/firmware/
# cp iwlwifi-3945-2.ucode iwlwifi-3945-1.ucode
# ifconfig wlan0 up

And try to connect.

Monday, September 21, 2015

IntelliJ IDEA - Keyboard Shortcuts And More for An Ex-Eclipse User

Since, couple years ago, JetBrains made available its IntelliJ IDEA to users for free (yes, only its Community Edition), it became an interesting alternative to Eclipse IDE.  While Eclipse is a great IDE, people looking for something more (even if just a little more), may be tempted to switch to IDEA, so here's something for them from another developer tempted to switch as well.

I have bolded out the actions I tend to use all the time in Eclipse.

Basic Shortcuts:

  • C-N - open class
  • C-S-N - open any file
  • A-F7 - find all usages of the object in the workspace
  • C-Q - quick doco (info) about the object under cursor
  • C-click - go to definition/implementation
  • C-F12 - show quick outline of the class
  • C-Space - auto complete
  • C-S-Space - power auto complete (Tan and Enter - both select, but differently)
  • A-Insert - code generate
  • C-/ - comments with //
  • C-S-/ - comments with /*...*/
  • C-D - duplicates the selection
  • C-S-BckSpc - move back in change-history locations
  • C-S-F7 - highlight an identifier; F3 and S-F3 move to next/prev usage; Esc - de-highlight
  • Code | Optimize Imports - from menu
  • C-E - recent files list
  • call tree of the current method: C-A-H
  • locate the current file in the project tree: there is an icon in the project viewer
  • move selected statements up or down the file: C-S-up and down
  • go to declaration of the object: C-B
Legend: C means Control, S - Shift and A - Alt

Advanced Shortcuts:

  • S-F6 - refactor: rename
  • Esc - in a tool window - moves focus to editor (S-Esc - also hides the tool window)
  • F12 - opposite to Esc
  • C-A-T - surround it
  • C-W - extend the selection
  • C-A-V - refactor: extract variable
  • Tab - live templates (np. itar Tab)
  • Local History | Show History - from file or directory shows and lets  revert to any version all changes in this file or directory

Shortcuts I'm Still Not Finding in IntelliJ:

  • go back in the browsing history (as opposed to change history)
    • try: C-A-left and right or C-[
  • synchronize a file or a project against the SVN repo

Friday, August 14, 2015


Copy just the schema of a database: do Backup, with any format other than Plain (it requires pgsql to import it) and on the Option tab page select Schema Only.  It runs pg_dump behind the scene.  You will need pgAdmin newer than 1.16 which allowed schema-only option with Plain format only.
The problem is, version 1.20, for example, copies the whole database even if I check Schema-Only.

Back to Plain format.  After generating it, open CMD in where pgAdmin was installed and run:

psql -d my-db-name -f "c:\aaa\my-exported-schema-file" -U postgres 

It will ask for the password.  The tool psql comes bundled with pgAdmin, at least it does in version 1.20.

Saturday, July 18, 2015

I Need Web Hosting Service - Small Size


I decided to host my genealogy tree using TNG software.  And so, I need webhosting service.  Small. Neither my tree is big, nor do I expect havey traffic to it, since I plan to open it only to my extended family.

First Impressions from Market Search

First, skip all companies advertising $2 hosting a month.  Haven't found one, that has a similar price for more than a first month.  Second, you may skip the so-called unlimited hosting.  At best, they will shutdown your service when when you generate more than average traffic from and to it.  Then, there are companies that squeeze so much from their hardware, that their server response is terrible, although basically everything works.  After this, you get prices of some $5 a month or more.  And this with only 500MB of disk space.  This was US market.

If you speak Polish, or are adventurous, go for polish web hosting.  They're still a jungle, but I have found a opinion based ranking of polish web hosting services at  That website has also filterable collection of over 4K older and recent user opinions, So, you can easily check just opinions, for linuxpl, which is the company that seem to make my cut. It seems, for 2GB disk space with 50GB transfer (monthly) they charge about $13 a year.


I'll report on progress and my experience as I go.

I'd Like to Publish My Family Tree

Why publish on the internet? 

Why not just keeping it on the desktop/laptop at home?
  • Desktop and laptops do break and sometimes you may lose your data.
  • I'd like to share information easier with other members of my family.

There are many options, that is, many sites where you can publish your family tree. The question is about privacy and data ownership. First of all, I don't want my family tree to be public (at least not as a whole). Two, I want to preserve the ownership of the information.

I'm willing to pay for the service, but a reasonable amount, for example up to $50 a year. Ah, currently I don't have enough time to host a genealogy software on my own website. It does take time (although, at the end I consider this option, too).

Candidate websites 

Below candidates come from this review:
  1. family trees can be made private and shared only with the users you want (who can access them for free), the website is free to enter the family tree info BUT all receives perpetual, complete right to all the user content in very generous terms (generous to
  2. Up to 10MB of space is free for user family tree info and access is controlled by the user (there is a fee for more space, $24-$48 per year). Tribal Pages will not share use etc. the user content and user preserves the full ownership.
  3. To any data entered on this website, user gives to the owner of the website a non-exclusive, royalty-free, worldwide, sublicenseable, and transferable license to use, copy publish, etc very much like with in point 1 above.

Clearly options 1 and 3 do not satisfy my expectations. Option 2 does, however.

GEDCOM import and export

GEDCOM file format for genealogical data is de facto standard and I need as means of importing the information, I have now and to export the information, if I ever need to move to a different site or software.

For Tribalpages, I have also checked this important for me issue. Import: yes. Export: yes, as a backup function, only with paid accounts, no photos in gedcom.


Actually, for the parameters described above, hosting a genealogy software on my own website might be ideal (despite my earlier assumption of the opposite). Candidates:
  • TNG or The Next Generation, $25 or less, one time cost, proprietary license.
  • webtrees - a free GPL-licensed PHP-written software. Comparing to TNG, it misses only WordPress integration, duplicate finder (there partial for this) and possibly a photo gallery (it supports photos, of course, though).

Both softwares have GEDCOM support and both require a web hosting service, LAMP hosting would be sufficient. But finding a reasonable web hosting service, not too expensive, but not a fake (by this, I mean companies, that artificially drive their price very low, but provide poor service, for example, by using insufficient hardware, or cutting off customers, whose websites generate much traffic, even if it's within the agreed bandwidth), that is a quite separate issue.


Let me know, what solution do you use to publish your family tree.

Connect Windows to Windows and to Android via FTP

Applications I Tried and Used - Conclusions

I had a need to transfer files from one laptop with windows to another, in a safe way.  The first laptop had a bad virus, removed, but I wasn't going to risk it and wanted to copy just data files and be sure that no virus gets transfered.  I chose ftp, as opposed to, for example, a USB drive, that could get infected and then infect the seconds laptop.  With ftp, I just made sure I didn't copy files that could carry a virus.

Android, I used only to diagnose the connection problem. It worked.


  • ftp server: Filezilla Grade: 5 of 5
  • firewall, option 1: built-in (Windows 7)
    Result: doesn't allow traffic to ftp server even when added to allow programs. Grade: 1 of 5
  • firewall, option 2: Comodo. Grade: 5 of 5


  • ftp client: AndFTP. Grade: 5 of 5
  • firewall: NoRoot Firewall. 
    Result: Silently ignores connections to local network, but otherwise great. Grade: 4 of 5 
  • network monitoring: Network Connections.
    Result: Doesn't show network requests but only established connections (attempt to connect to Windows ftp server which was blocked by Windows firewall wasn't reported). This limits a usefulness. Grade: 4 of 5