ssh Command Examples

ssh lets you login to remote hosts and transfer files

ssh command Syntax

$ ssh options

Options Description
-V get the version of the SSH Client
-v verbose

ssh command examples

login to remote hosts


login to remote hosts with verbose messages. Causes ssh to print debugging messages about its progress.

ssh -v

 MySQL: Backup Database with mysqldump from the Command Line

Backups are an essential part of development. You always want backups. mysqldump is the goto program to backup mysql databases

Backup a database

mysqldump database_name > database_dump.sql

Backup a database with username and password

mysqldump -u username -p password database_name > database_dump.sql

Backup a database with username and password and compressed

mysqldump -u username -p password database_name | gzip > database_dump.sql.gz
mysqldump -u username -p password database_name | bzip2 > database_dump.sql.bz2

 whenever: command not found

The whenever is a gem that allows you to write cron jobs easily.

every 2.hours do
  command "mysqldump db > db.sql"
every :day, :at => '12:20am' do
  command "mysqldump db > db.sql"

whenever: command not found

A whenever: command not found error is shown whenever the whenever gem is not installed or cannot be seen

$ whenever
whenever: command not found
$ gem list | grep whenever

The thing since we almost always use bundler, you should use the bundle exec command:

$ bundle show whenever

So running whenever commands would be:

$ bundle exec whenever
0 0,12 * * * /bin/bash -l -c 'mysqldump -u username -p password database_name | bzip2 -c > backup_$(date +\%Y-\%m-\%d-\%H.\%M.\%S).sql.bz2'

Write crontab

$ bundle exec whenever -w
[write] crontab file written

 Drupal 8 has been released

The long awaited Drupal 8 has been released.

* In-context, what-you-see-is-what-you-get (WYSIWYG) editing and previews
* Comprehensive content modeling out of the box with entities, fields, and views
* Customization of content pages and even forms and administrative pages via the administrative interface
* Full translatability and localization out of the box
* Reliable configuration management for safe and straightforward deployment of changes between environments
* Mobile-first, responsive, HTML5 output
* REST-first native web services
* Enhanced accessibility and WAI-ARIA compliance
* Modern PHP standards and practices, with integration of popular libraries such as Composer, Symfony2, Guzzle, and Twig
* Significantly improved front-end performance out of the box
* Enhanced caching and best-of-class integration with CDNs and reverse proxies
* Full compatibility with PHP7, and the PostgreSQL and SQLite databases
* …And much more!

You can download the latest and most awesome version of the software to date here:

Download Drupal 8

I myself, am very excited to work on Drupal in the next few days.