Posts

Change Firefox Browser Default View Source Editor to your Favorite Text Editor

Firefox browser recent update reset my favorite default text editor and I ended up fixing it. Here are the steps to update it: In the Browser address bar type about:config . This will show you a warning message. Accept it. In the Search bar type view_source.editor.external . This will show you the matching entry below pane. Toggle the Boolean Value false to true by double clicking it. Next, in the search bar type view_source.editor.path . This will show you the matching entry below pane. double click the Value field and it will popup a dialog box with a text field. Enter the path to your favorite text editor and click OK. close the Tab. You are all set. Enjoy viewing the source code in your favorite text editor

Mysql on XAMPP performance issues and tuning

Many of us would have faced the problem of slow running local XAMPP setup at times during a crucial development phase and wished there was a quick fix. One such issue is a slow mysql. There are many ways of tuning and fixing the problem. If the issue is around the growing size of the application and needing more resource, you can try replacing the mysql config file. XAMPP provides 4 default mysql config files my.ini for different size applications. They are named as below: my-small.ini my-medium.ini my-large.ini my-huge.ini Depending on the size of your application you can pick one and replace it in to my.ini . The path to this default files on a windows system is C:\xampp\mysql (if the xampp is installed under the root of c:). The my.ini file is placed under : C:\xampp\mysql\bin . Just copy the file my-<size>.ini in to the C:\xampp\mysql\bin and rename it to my.ini . Restart the XAMPP. This could turn out to be that quick fix you are looking for.

Search for a string in multiple files

grep is a common command used on unix for searching. This is a very useful tool and provides powerful options. One such option is to search for a string in multiple files in the current directory and sub directories. The command is : grep -rl "search string" /usr -r stands for search recursively in current directory and sub directory. -l suppress the display of additional information and just outputs the file names. /usr refers to root folder under which the search happens.

How to Increase the timeout in phpMyAdmin

At times when you are busy running some query or importing/exporting some data it is very annoying to see the script timeout with default 300sec processing time. Well there is a simple solution to fix that. Modify or add the following variable in the config.inc.php file located under C:\xampp\phpMyAdmin folder for a xamp installation on Windows. $cfg['ExecTimeLimit'] = 0; /* 0 stands for unlimited time of execution*/ You can also just extend the time to what ever you want if unlimited is not your way of doing things. Here is another example: $cfg['ExecTimeLimit'] = 600; /* 600 seconds */ The file config.inc.php may be found under different paths based on your OS and installations. On my GNU/Linux server the path is /etc/phpMyAdmin/config.inc.php

How to find the Size of a folder in Unix

Its very easy to find the size of a folder in windows, where as it might be difficult to a novice user doing the same on Unix based systems. Its because the Unix file system does not show a folder size in a file listing using a short listing ls or long listing ls -l The size of 4.0k or so shown before the folder name in a long listing is not an actual size of the folder. However we are blessed with many simple commands that makes our jobs simple. One such command is du . This command stands for disk usage, represented in short as du. It recursively access all the files and sub folder under a given folder and display the size of each of this items. To display the total size of the folder in MB, GB etc., use the command du -sh Option s says du to summarize the results and do not display the details of sub folder and files Option h says display the size in human readable format i.e., K for kilobytes, M for megabytes & G for gigabytes

Delete multiple lines in Linux style Vi Editor

We often have situations were we need to modify a file using vi on Unix style file system and delete multiple lines. Here are some details and examples on how to do it. Syntax: xdd dd is the command to delete a complete row. x in the number of lines to be deleted. Examples: delete 2 lines 2dd delete 10 lines 10dd