Thursday, 17 July 2014

Create Wi-Fi Hotspot in Windows


Open your cmd.exe with Administrator account and paste these command line after line


netsh wlan set hostednetwork mode=allow ssid=hotspot key=password keyUsage=persistant

netsh wlan start hostednetwork
Thats it , now scan your Wi-Fi for hotspot. You can use any where , you just require wireless router/modem.

Take picture from terminal


PHPMyAdmin in your CentOS 6.X


Open your terminal and EPEL Repo

 wget http://epel.mirror.net.in/epel/6/i386/epel-release-6-8.noarch.rpm 
rpm -Uvh epel-release-6-8.noarch.rpm

Then Add Remi

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 

Now open /etc/httpd/conf.d/phpMyAdmin.conf file and enter the address field with address from where you want access PhPMyAdmin remotely cause it is accessed by default from localhost only.

vim /etc/httpd/conf.d/phpMyAdmin.conf
 

Next restart your httpd with

service httpd restart 
 
Open your browser and type there as localhost/phpmyadmin and login with your mysql username and password. If you want browse remotely then your IP must allowed( added ) from above mentioned configuration file. Note: This information has taken from several sources.

Thursday, 19 June 2014

Mobile redirection with Javascript

Put this in default page that will load and with script tags.

<script>
if( /Android|webOS|iPhone|iPod|BlackBerry|Symbian|IEMobile/i.test(navigator.userAgent) ) {
window.location = "mobile";
}
</script>

Wednesday, 18 June 2014

Sending mail from CentOS

Actually sending mail from a CentOS server/Desktop install is pretty easy. You can do that in many ways but I like this way because it is simpler.

Before sending the mail, the content of your mail if you store at some place would be better. assume like I have stored my message /tmp/body file.

Then I will sent my message as

mail -s "This is subject of message" raja@raja.com < /tmp/message

thats it. check for your mail in inbox/spam/junk box.

Create Bootable Linux ISO from DD command


I have tried many times to create a Bootable USB linux from ISO but failed almost 20 times. After a lot of googling I have found as this is the proper command

dd if=/path/to/ISO.iso of=/dev/sda bs=4M;sync

Thats it. Note: at of=/dev/sda dont give anything after your device. for example If your USB mounted as /dev/sdb1 then at of you should give as of=/dev/sdb only.

Tuesday, 20 May 2014

Set brightness from terminal


Set Screen Brightness from Terminal

We can set screen brightness from terminal by using xbacklight. Intially we have to install it before using. Open your terminal and type as

sudo apt-get install xbacklight

and then to set brightness to 10% more execute the command as

xbacklight -inc 10

To decrease brightness by 10%

xbacklight -dec 10

If you want to set the brightness to some level then, you can use the command as

xbacklight -set 50

The above command will set the brightness to 50. It will range from 0 to 100.
If you have any issues you can use comments to let me know.
Hope that helps.