Linux RSYNC command

rsync is a Linux tool for backup and the creation of mirror. It support copying of links, preserving owners, groups and permission. It can use ssh to do the copy. It is extremely useful for mirroring other machine. rsync can work for both directions, remote to local, and local to remote. Anther advantage of the … Continue reading Linux RSYNC command


MariaDB list columns of Tables

In mariaDB if we want to see the name and the type of the different columns in a table, we should run: SHOW COLUMNS IN <tableName>; For example to check the columns' names and types of fruit table, we run: MariaDB [food]> SHOW COLUMNS IN fruit; +-------+------+------+-----+---------+-------+ | Field | Type | Null | Key … Continue reading MariaDB list columns of Tables

Linux ssh-keygen and openssl commands

ssh-keygen This command will create a pair of private and public keys. It will ask for the location of the key and whether to use a passphrase. [oren@localhost ~]$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/oren/.ssh/id_rsa): /home/oren/.ssh/id_rsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): … Continue reading Linux ssh-keygen and openssl commands

Allowing process to bind to port lower than 1024 in Linux

In Linux by default process has no permission to bind themselves to any port lower than 1024 (unless you are the root user of course). So if for example, we want our node js application to listen on port 80, the default port for HTTP, we will probably get the following exception: events.js:160 throw er; … Continue reading Allowing process to bind to port lower than 1024 in Linux

Javascript visibilty api

HTML 5 spec include nice api that allow us to know from the javascript if the page is visible to the user or not. we can also listen to event that is fired every time the visibility state change. The java script event for change in visibility is visibilitychange so we can listen to this event, and when … Continue reading Javascript visibilty api