Showing posts with label step by step. Show all posts
Showing posts with label step by step. Show all posts

Saturday, September 21, 2013

How to Create Custom Google Chrome Shortcuts - Launching Extensions & Browser Actions

In the age of Information explosion and internet era, web browsers are not only for browsing web pages but also for doing something beyond our expectations. Most prominent example we can point out for such a browser is Google Chrome, based on open-source Chromium project, which the Silicon Valley technology giant owns. Without considering the software or platform you use, Shortcut keys are truly worthy, especially for those who love quicker and productive techy life.

In that sense, I hope that you will love to know about how you can create your own Google Chrome shortcuts and hence making usage like never before.




Create Custom Google Chrome Shortcuts

Here, I am going to make use of some in-built abilities of Google Chrome as well as some powerful extensions. First, I will set up custom keyboard shortcuts for specific extensions using in-built feature of Google Chrome. I also hope that this tutorial will help you in replacing hard-to-use Google Chrome shortcuts by easier ones at instance.

Google Chrome Shortcuts for Launching Extensions

As mentioned earlier, Google Chrome has a pre-built feature for assigning keyboard shortcuts for each browser extensions you have installed. Albeit the fact that it is a less-known feature, it is a truly productive one. When compared to the latter option, involving a third-party extension, the process of assigning keyboard shortcut is an easy job. You just have to follow steps mentioned below.

Step One

Launch Google Chrome browser and navigate to the extension manager section. You may make use of either of following methods.
  • Click on ‘Options button’, right to address bar -> Tools -> Extensions and it will lead you to the Extension Manager
  • Type ‘chrome://extensions’ in your address bar and hit Enter
    Google Chrome Extension Manager 

Step Two

There, you can see information about each Google chrome extension you have installed, along with highlighting effect for active ones. There are various options for enabling/disabling extensions, deleting and managing options and permissions. However, you have to scroll down and find out the option ‘Keyboard Shortcut and click on it.
Google Extension Manager: Create Shortcuts for Apps

Step Three

Instantly, you can see a pop-up window like shown in the following image. Size of the pop-up box may change according to the number of extensions, you have installed.

Keyboard Shortcuts Pop Up
As you can see in the image, there are no shortcuts set for extensions. Now, you can start assigning shortcuts for each extension, shown there.

Step Four

For assigning Google Chrome shortcuts for each extension, you have to click on the corresponding filed of that section. Once you have clicked, the background of the field will turn red along with one message ‘Type a shortcut’, just like in following image.

Typing Shortcut Extension Manager

Step Five

Now, you have to enter the shortcut, by pressing which you want to open the extension later. For instance, we have assigned the shortcut ‘Ctrl+Shift+W’ for WebRank SEO extension.



Type Shortcut Key Extension

However, you should try to not to give the in-built shortcuts of Google Chrome (like Ctrl+T, Ctrl+W) in those sections in order to avoid the clash. Once you have given all the details correctly, you may click on ‘OK’ button, which will close the pop-up window.

Yes! You have successfully assigned Google Chrome shortcuts for your favourite extensions.

Google Chrome Shortcuts for Various Browser Actions

Even though the former method can help you in activating extensions instantly, Google Chrome does not have an option for controlling browser actions. Therefore, I have to make use of an extension for doing the job neatly. You just have to keep track on following steps to assign Google chrome shortcuts for browser actions.

Step One

First, as I said earlier, you have to install one extension in your Google Chrome browser. You can download this FREE extension, Shortcut Manager, from Chrome Web Store.

Shortcut Manager Extension Installation Step One

Step Two

After installation, taking not more than some seconds, you can see a button, like shown below, near to the address bar of Chrome.



Shortcut Manager Extension Installed

When you click on it, you can see a message like shown below. From the dialogue box, select option ‘See all settings / Add new shortcuts’, which will lead you to another page, the options page of the extension.

Step Three

The options dashboard of Shortcut manager will be like in the following image, consisting of various sections. From the right top section, click on ‘Add a new shortcut’

Shortcut Manager Extension Installed Add New Shortcut


On the right section, you can see multiple columns with different labels. On the first column, named Shortcut key’ you have to type the shortcut. For doing that, click on filed and enter the shortcut keys combination. As you cannot use the backspace for correcting short key, you will have to hit the Clear button for erasing the shortcut key you have entered. In case, if you click the backspace button, it will be also included in the shortcut combination.
Shortcut Manager Save Shortcut

Step Four

In the below section, you can see a field named Action, where you have to define the browser action according to your desire. There are two options available in this section.

1. Browser Action

Here, you have a list of browser actions to choose from. List includes opening new tab, opening tab in new window, moving tabs, webpage navigation, scrolling, screen capture, navigate to downloads, open nth tab, take screenshots etc. In case if you have selected option to open favourite URL, you should give the URL next to the field.

Shortcut Key Working Extension Browser Actions

2. Execute JavaScript

You can assign one shortcut for executing a specific JavaScript. You have to select the latter option and then give the JavaScript file URL or the script itself in corresponding fields.
Shortcut Key Working Extension Enter Shortcut Key

Step Five

You have an option for restraining effects of specific Google Chrome shortcuts in some sites, even though all pages will have effect of shortcuts according to the default setting. If you want to restrict so, you should give URL’s in the section called ‘URL Patterns’

URL Patterns Shortcut Manager

Final Step

If you have given all things correct and accordingly, you can now go back to the top section of page and click ‘Save’. After the re-launching of Google Chrome, the extension will be working fine as usual.

Shortcut Manager Save Shortcut








In addition, you have options for restricting or disabling some Google Chrome shortcuts in sometime. You shall go to the options page, select the corresponding shortcut from list and hit ‘Disable’ to remove its effect from Google Chrome immediately.

Conclusion

Here, I have shown you some options for assigning custom Google Chrome shortcuts for browser actions as well as for launching extensions. Hope both of these methods will be useful for your quicker techy life. Do you know any other methods for assigning Google Chrome shortcuts? Do let us know via comments.

Friday, August 20, 2010

How to Install PHP on Windows 7








Installing PHP on Windows 7 is quite a simple affair. However, as the more experienced developers would know, you need to have a web server running first. I suggest using the world's most popular web server - get instructions on how to install Apache on Windows 7 operating system. And if you are a budding PHP programmer, you would very soon like to use it with MySQL database. So once you have finished with PHP installation, read the steps to install MySQL on Windows 7.

Assuming you have successfully been able to install Apache on Windows 7 and have seen the "It works" page, download the PHP file from www.php.net. Though I am on a 64 bit Windows 7 system, I downloaded php-5.2.11-Win32.zip because PHP doesn't come in 64 bit flavour.

Create a folder to install PHP

This tutorial will tell you how to install PHP from the zip archive and not from the installer file - [Slide 1]. Somehow, I've found this is a little simpler. So the first thing is to create a folder where you would like to unzip the PHP files. I like to keep things segregated and yet accessible. Giving PHP its own directory under the C: drive is what I generally do. So go ahead and create a folder called PHP in the C drive on your hard disk. Now unzip the contents of the downloaded PHP zip file into this folder - [Slide 2].
In this C:/PHP folder, you'll see a file called php.ini-recommended. Right-click on this file and choose Copy - [Slide 3]. Now paste the file in the same directory - [Slide 4].
Very important: Rename this file to
php.ini. Windows will tell you that changing the extension will make it unusable - Ignore the message and continue - [Slide 5].


Configuration Apache 2.2 web server for PHP installation

Though you have been able to put PHP on your computer, it's still not "installed" in the true sense of the word. We have to help the Apache web server communicate with PHP. This is done by editing the Apache configuration file, httpd.conf. Go to All Programs -> Apache HTTP Server 2.2 -> Configure Apache Server -> Edit the Apache httpd.conf Configuration File. This opens httpd.conf file in Notepad - [Slide 6].
Gear up to make some changes to this file- check the screenshots from the slideshow as you go along.


  • Locate the "LoadModule section" (Tip: use the Find feature or the Ctrl-F key combination). Add the following line - [Slide 7]LoadModule php5_module "c:/PHP/php5apache2_2.dll"

    Note: If you have chosen to install PHP is a different folder and not C:/PHP, you have to change the path in the above line.

  • Find the "AddType" section and put in the line below - [Slide 8].AddType application/x-httpd-php .php

    Note: You can also use other file extensions for PHP like .php3 or .php4 - simply add them at the end of the above line separated by a blank space.

  • Move to the end of the httpd.conf file and add the line below - [Slide 9]PHPIniDir "C:/PHP"

    Note: This tells the Apache web server the location of the PHP configuration file -
    php.ini.

  • If you've read my instructions on installing Apache on Windows7 know that all web site files are to be kept in the htdocs folder located under the Apache install directory. This means when you load http://localhost, Apache checks the htdocs folder - the "It works" file that's displayed the first time you test Apache installation is actually the index.html file in this folder.
    In accordance to my habit of having things organized, I like to keep web site files in their own folder away from Apache program and configuration files... something like
    C:/websites. The good news is that Apache allows you to make such a change pretty easily and to do this, you need to specify this new directory path as the document root.
    First create a folder for your web site files -
    C:/websites is what I use and is a nice choice. Find the DocumentRoot "C:/Apache/htdocs" in the Apache configuration file and change it to DocumentRoot "C:/websites" - [Slide 10].


  • Lastly, change <Directory "C:/Apache/htdocs"> to <Directory "C:/websites"> - [Slide 11].


Testing the PHP installation

Save the httpd.conf file - "File" -> "Save" [Slide 12] and restart your computer. You actually don't need to restart the machine; stopping and starting the Apache service would have probably worked but I needed a cup of tea.
It's now time to test whether PHP was properly installed on Windows 7. Open a Notepad window and type in the line below exactly as it appears - you can copy-paste if you want.
<?php phpinfo(); ?>
Save this file as phpinfo.php in the document root folder which should be C:/websites if you have followed by instructions above.

IMPORTANT: By default, Notepad will save the file as
.txt. So you need to select "All Files" from the "Save as type" drop down and enter the full file name in the "File name" field. Confused? Check the screenshot - [Slide 13].

Open a browser window and load http://localhost/phpinfo.php. A long page with details of the installed PHP version should display - please refer the screenshot in the slideshow - [Slide 14]. If you don't get this and see the PHP code instead, you've probably not saved the file with a .php extension.

This completes the instructions on how to install PHP on Windows 7. I also advice going through the PHP configuration file (php.ini) and making modifications as required.

How to install MySQL on Windows 7



This blog post is on how to install MySQL on Windows 7 is in continuation to the Apache and PHP installations on the same operating system. Before we begin, I like you to determine the system type - whether your computer is 32 bit or 64 bit. This is important as I had a horrendous time trying to troubleshoot PHP-MySQL connection problem - I have detailed this in a blog post - MySQL on a 64 bit Windows 7. You can know the system type from the "Control Panel" -> "System and Security" -> "System".

Download MySQL installer file
Be sure to choose the MySQL installer file that corresponds to your system type. For me, it was the mysql-essential-5.1.40-winx64.msi file from the MySQL.com web site. I chose the essentials file because it is sufficient for my needs. However, there is nothing stopping you from picking the bulky Windows MSI Installer if you want.

Instructions to install MySQL on Windows 7
The screenshots have been presented in a slideshow below - refer these if you have doubts. The process of installing MySQL is not very difficult, so don't be intimidated by the large number of slides; I just wanted to be thorough.



  • Start MySQL installation by double-clicking the .msi file - click "Run" when prompted - [Slide 1].

  • Click "Next" button in the introductory window - [Slide 2].

  • In the following screen, select Custom installation which will allow you to specify the folder to which MySQL will be installed. You can go ahead with a Typical MySQL setup but this will put MySQL deep down in the "Program Files" folder - [Slide 3].

  • Click the "Change" button and enter C:\MySQL in the Folder name field. Hit "OK" when done - [Slides 4 and 5].

  • The installer will change the MySQL installation folder to the one specified by you - [Slide 6].

  • You are now ready to install MySQL on Windows 7 operating system. Click "Install" - [Slide 7].

  • It would take some time for the progress bar to move ahead... be patient - [Slide 8].

  • You may also get messages along the way - simply click on "Next" to proceed - [Slide 9].

  • When the process finishes, you'll get to see the final screen. Congratulations - MySQL has been installed on your computer. You are now prompted to Configure the MySQL server and register the product. In the interest of time, I had unchecked the second box and clicked "Finish". You can do the same if you want - [Slide 10].

  • MySQL instance configuration is important - you cannot use the software until you do so. Click "Next" to proceed - [Slide 11].

  • Select "Detailed Configuration" option - [Slide 12].

  • Choose "Developer Machine" - [Slide 13].

  • I suggest going ahead with "Multifunctional Database" unless you know what you are doing - [Slide 14].

  • In the following screen, don't mess with the default values and click "Next" - [Slide 15].

  • The same goes for the subsequent screen - click "Next" - [Slide 16].

  • For the networking options configuration, put a check mark in front of "Enable Strict Mode" if it's not there - [Slide 17].

  • Yes, it's recommended to install MySQL as a Windows service and have the system include the MySQL bin directory in the Windows PATH variable - [Slide 18].

  • The password for the MySQL server instance has to be typed in twice. Remember to keep a note of it - Don't lose this MySQL password - [Slide 19].

  • The configuration wizard has received all the information it needs and is ready to create a MySQL server instance. Click "Execute" button - [Slide 20].

  • The instance should be configured without problems. If you do get a message from an anti-virus program or the Windows 7 operating system - choose the option to move ahead - [Slides 21 and 22].

Checking the MySQL installation

The easiest way to check MySQL installation and confirm that it's working properly is to use the MySQL Command Line Client. Fire it up from "All Programs" -> "MySQL" -> "MySQL Server 5.1" - [Slide 23].
Now enter the MySQL password - the characters you type will be replaced by the asterisk sign (the password is not shown for security reasons - obviously) - [Slide 24].
The MySQL client displays the mysql> prompt on successful login - [Slide 25]. Type show databases; (the semi-colon at the end is not a typo) and hit the enter key. This simple SQL command instructs MySQL to display the names of the installed databases, which should be three. Hurray - rejoice because you have been able to correctly install MySQL on Windows 7! [ Slide 26]

Configuring PHP to work with the MySQL installation

The PHP configuration file is php.ini located right in the install directory which should be C:/PHP if you have followed my instructions on how to install PHP on Windows 7 computer. We now have to modify this file so that all the three - Apache, PHP and MySQL - work together.

  • By default, PHP doesn't display error messages. This may be a good idea on a web server (security reasons) but for a developer machine (such as your local computer), you would like to see errors. The PHP error messages can point to the line which is causing your scripts to fail.
    [Slide 27] - Find the line
    error_reporting = E_ALL and change it to error_reporting = E_ALL & ~E_NOTICE
    [Slide 28] - Also change
    display_errors = Off to display_errors = On.

  • PHP also needs to be told the directory in which the extensions reside. Unearth the extension_dir = "./" line and change it to extension_dir = C:\PHP\ext. (I've assumed you've installed PHP in C:/PHP. If not, you have to specify the correct path.) - [Slide 29]

  • We need PHP to work with MySQL and, hence, have to load the required extensions. Locate the 'Extensions' section and uncomment (remove the semicolon in front of) the following lines - [Slide 30].extension=php_mysql.dll
    extension=php_mysqli.dll


  • [Slide 31] - Locate the register_globals = Off line and change it to register_globals = On. Experienced developers would tell you not to go ahead with this modification. I do this because a lot of my scripts won't work otherwise - I leave the decision to you.
Save the php.ini file and restart your computer - this will give you time to stretch your legs. By the way, as I had mentioned in the beginning, you have to a web server for PHP to work - read install Apache on Windows 7 for instructions.
Finally, if you have already been using MySQL on another computer you can quickly transfer the databases and tables using mysqldump and the mysql programs.

How to Install Apache on Windows 7


This blog provides detailed step by step instructions on how to install Apache on Windows 7 operating system. Chances are that you would follow the Apache installation with PHP and MySQL database.
Though not required for installing Apache, I suggest you check the system type - whether the Windows 7 your computer is running is 32 bit or 64 bit. This information is available from "Control Panel" -> "System and Security" -> "System" -> "System type". We'll need it when we come to installing MySQL.

Download the Apache Windows installer file
Point your browser to the Apache download page. Click on Win32 Binary without crypto (no mod_ssl) (MSI Installer) file; for instance, I downloaded apache_2.2.14-win32-x86-no_ssl.msi. Double-click on this file to start Apache installation. If you are shown a security warning, ignore it and click "Run" to continue - [Slide 1 in the slideshow below].



  • Click on "Next" in the introductory screen - [Slide 2].

  • Select the "I accept the terms in the license agreement" radio button and hit "Next" - [Slide 3].

  • Enter localhost for both "Network Domain" and "Server Name". In the "Administrator's Email Address" field I generally type in webmaster@localhost. Move to the next screen - [Slide 4].

  • Proceed with Typical installation type, unless you want to be adventurous! - [Slide 5]

  • As you can see from the screenshot, by default, Apache is installed in a folder deep under the "Program Files folder. I don't like this and would recommend that you change the installation directory too. I like to keep things slightly organized and prefer Apache to reside in its own folder on the C: drive. I entered C:\Apache as the destination folder and I suggest you do the same - [Slides 6 and 7].

  • To start installing Apache 2.2 on Windows 7, click on the "Install" button and sit back - [Slides 8 and 9].

  • By the way, if the installation process is interrupted by the anti-virus program on your computer, just provide permissions for it to continue - [Slide 10].

  • In a few minutes, the Apache web server would be installed on your Windows 7 computer - [Slide 11].

  • To test the installation, open a web browser window, enter http://localhost/ in the address bar and hit the "Enter" key - [Slide 12].

  • If you get a page with the words "It works!", celebrate, because you now have the Apache web server running on your Windows 7 computer. Didn't get this message? You may need to start Apache. Go to "All Programs" -> "Apache HTTP Server 2.2" -> "Control Apache Server" and select either "Start" or "Restart". The Apache server can also be started and stopped from "Services" under the Control Panel - [Slide 13 and 14].
For the newly initiated, the HTML file that is displayed when you load http://localhost/ is index.html located inside the htdocs folder in the Apache install directory. Now that Apache has been installed on your Windows 7 computer and is successfully running.

Recommend this

Related Posts Plugin for WordPress, Blogger...