Monthly Archive: June 2014

Saving the master boot record of hard-disk under Debian 0

Saving the master boot record of hard-disk under Debian

Backup The first line is to backup MBR, the second line is to backup extended partitions (important just as well!!) $> dd if=/dev/sda of=/tmp/backup-sda.mbr bs=512 count=1 $> sfdisk -d /dev/sda > /tmp/backup-sda.sfdisk Restore $>...

How to setup an automated git email notifier server 0

How to setup an automated git email notifier server

  (1) sudo wget http://git.icir.org/git-notifier.git/blob_plain/refs/heads/master:/git-notifier -O /usr/share/git-core/contrib/hooks/git-notifier chmod +x /usr/share/git-core/contrib/hooks/git-notifier (2) Add ssh private key to your .shh folder so git operations dont ask for password. This will be automated. (3) For each new...

Sending mail with java mail javax Mailer encrypted SSL or TLS 0

Sending mail with java mail javax Mailer encrypted SSL or TLS

  This is about sending mail, so we are talking about a SMTP server   The code Properties props = new Properties(); if (Integer.parseInt(port) == 465) // SSL { props.put("mail.smtp.auth", "true"); props.put("mail.smtp.socketFactory.port", port); props.put("mail.smtp.socketFactory.class",...

How to stop auto-indent on WebStorm IDE 0

How to stop auto-indent on WebStorm IDE

Disabling auto-indent on WebStorm WebStorm is quite a different editor than Visual Studio. For one thing it saves automatically files after you make changes. There is no save button ! This can be good...