Monday, August 4, 2014

How to Enable Hibernation in Ubuntu 14.04


How to Enable Hibernation in Ubuntu 14.04

Enable Hibernate
------------------

/var/lib/polkit-1/localauthority/50-local.d/hibernate.pkla


[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes


Hibernate your laptop when lid is closed
------------------------------------------
sudo gedit /etc/systemd/logind.conf


Change the line #HandleLidSwitch=suspend to HandleLidSwitch=hibernate


Share Article : How to Enable Hibernation in Ubuntu 14.04
Share/Save/Bookmark

Monday, May 19, 2014

Some php stuff



  • format datetime to date -   date("Y-m-d", strtotime($row->created_date))

Share Article : Some php stuff
Share/Save/Bookmark

Wednesday, March 19, 2014

Password -less ssh / scp with RSA on ubuntu


1. creare rsa on client [ssh-keygen -t rsa]
2. copy rsa to server [ssh-copy-id -i rsaformyserver.pub build@myserver]
3. Try ssh [ ssh -i rsaformyserver build@myserver ]
4. Do same on server side

Share Article : Password -less ssh / scp with RSA on ubuntu
Share/Save/Bookmark

Sunday, March 9, 2014

MS SQL Server How to implement LPAD as in Oracle


select REPLICATE('0', 4 - DATALENGTH('234')) +'234'

Share Article : MS SQL Server How to implement LPAD as in Oracle
Share/Save/Bookmark