Showing posts with label Web Development Tools. Show all posts
Showing posts with label Web Development Tools. Show all posts

Tuesday, March 3, 2015

How To Install the Firefox Developer Edition in Linux Ubuntu 14.10, Ubuntu 14.04 & Others

Method 1

  • Install Firefox Developer Edition, formerly know as Aurora by running the following commands:

    sudo add-apt-repository ppa:ubuntu-mozilla-daily/firefox-aurora
    sudo apt-get update
    sudo apt-get install firefox

    Ubuntu versions supported: Utopic (14.10), Trusty (14.04), Precise (12.04).
Note that this method will replace your current Firefox installation.

Method 2

  • Download the firefox developer edition here:
    https://www.mozilla.org/en-US/firefox/developer/
  • Extract the file manually to /opt/firefox/
  • Open Nautilus: Go to Edit->Preferences-> Behavior-> click on “Run executable text files when they are opened”
  • Go to the file ‘firefox’ in /opt/firefox/
  • Right click and select Properties–> Permissions–> Execute: Allow executing file as a program.
  • Open terminal and type:
  • 'gnome-desktop-item-edit' not installed in your computer then you want to run following command
sudo apt-get install gnome-panel
then run following command
gnome-desktop-item-edit ~/.local/share/applications --create-newCreate a shortcut and it’s done.


Thursday, February 26, 2015

HOWTO: Install xdebug for PHP5

Here is a mini-howto in how to install the xdebug extension with PHP5 in Ubuntu 7.04

This will install xdebug 2.0 (or whatever is latest version in PEAR repository when you try this).

It is assumed you have Apache2 + PHP5 working already.

Code:
sudo apt-get install php5-dev php-pear
Now install xdebug thru PECL.

Code:
sudo pecl install xdebug
Now we need to find where xdebug.so went (the compiled module)

Code:
martin@martin-dev:/$ find / -name 'xdebug.so' 2> /dev/null
/usr/lib/php5/20060613/xdebug.so
Then edit php.ini:

Code:
sudo gedit /etc/php/apache2/php.ini
Add the following line:

Code:
zend_extension="/usr/lib/php5/20060613/xdebug.so"
Then restart apache for changes to take effect

Code:
sudo /etc/init.d/apache2 restart
Check phpinfo() to make sure the extension is loaded correctly. The following line should have been appended to the copyright lines:

Wednesday, February 25, 2015

Introduction to Redis

Redis is an open source, BSD licensed, advanced key-value cache and store. It is often referred to as a data structure server since keys can contain stringshasheslistssetssorted setsbitmaps and hyperloglogs.
In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while, or by appending each command to a log. Persistence can be optionally disabled, if you just need a feature-rich, networked, in-memory cache.
Redis also supports trivial-to-setup master-slave asynchronous replication, with very fast non-blocking first synchronization, auto-reconnection with partial resynchronization on net split.
Other features include:
You can use Redis from most programming languages out there.
Redis is written in ANSI C and works in most POSIX systems like Linux, *BSD, OS X without external dependencies. Linux and OSX are the two operating systems where Redis is developed and more tested, and we recommend using Linux for deploying. Redis may work in Solaris-derived systems like SmartOS, but the support is best effort. There is no official support for Windows builds, but Microsoft develops and maintains a Win-64 port of Redis.

Tuesday, January 27, 2015

How to establish ssh key pair when “Host key verification failed”

I have set up ssh key pairs between my desktop and two servers, and from the servers to my desktop, but after reinstalling the OS on my desktop, I can't re-establish the keypair going into my desktop by this:
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t 
ssh-copy-id username@server
I get the following error:
(names in italics changed to protect the innocent My desktop is Ubuntu, and I can't find the answerhere)
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. The fingerprint for the RSA key sent by the remote host is ab:cd:ef:gh Please contact your system administrator. Add correct host key in /home/user/.ssh/known_hosts to get rid of this message. Offending key in /home/user/.ssh/known_hosts:1 RSA host key for user.server has changed and you have requested strict checking. Host key verification failed.

Solution

ssh-keygen -R hostname
This deletes the offending key from the known_hosts
The man page entry reads:
-R hostname Removes all keys belonging to hostname from a known_hosts file. This option is useful to delete hashed hosts (see the -H option above).

Monday, September 30, 2013

Increase or Change the phpMyAdmin Session Timeout

Did a little grepping and found that you can override this setting, even though it’s not documented anywhere but in teh codes (so far as I can tell). To override it, just open up config.inc.php in the root phpMyAdmin directory and add this setting (anywhere):
file located 
eg:
C:\wamp\apps\phpmyadmin3.5.1\libraries\config.default.php

$cfg['LoginCookieValidity'] = <your_new_timeout>;
Where <your_new_timeout> is some number larger than 1800. Personally, I chose 28800, which is 8 hours.  :P

Tuesday, December 25, 2012

How to remove unnessesary blank lines in your code

In Dreamviewer
  1. Open the file
  2. Click CTRL + F
  3. Select "Current document" in "Find in" (You can also select the folder if you have multiple files)
  4. Search in "Source code"
  5. Tick "Use regular expression"
  6. Type "[\r\n]{2,}" (without quotes) in "Find"
  7. Type "\n" (without quotes) in "Replace"
  8. Press "Replace All"

Friday, November 30, 2012

50 Extremely Useful PHP Tools

 50 Extremely Useful PHP Tools posted at Smashing Magazine

By Jacob Gube
PHP is one of the most widely used open-source server-side scripting languages that exist today. With over 20 million indexed domains using PHP, including major websites like Facebook, Digg and WordPress, there are good reasons why many Web developers prefer it to other server-side scripting languages, such as Python and Ruby.
PHP is faster (updated), and it is the most used scripting language in practice; it has detailed documentation, a huge community, numerous ready-to-use scripts and well-supported frameworks; and most importantly, it’s much easier to get started with PHP than with other scripting languages (Python, for example). That’s why it makes perfect sense to provide the huge community of PHP developers with an overview of useful tools and resources that can make their development process easier and more effective.
This post presents 50 useful PHP tools that can significantly improve your programming workflow. Among other things, you’ll find a plethora of libraries and classes that aid in debugging, testing, profiling and code-authoring in PHP.

Friday, May 7, 2010

Unit testing with PHPUnit

PHPUnit

In the last decade, PHP has developed from a niche language for adding dynamic functionality to small websites to a powerful tool making strong inroads into large-scale Web systems. Critical business logic like this needs to work correctly. But how do you ensure that it does? You test it, of course.

To make code testing viable, good tool support is needed. This is where PHPUnit comes into play. It is a member of the xUnit family of testing frameworks and provides both aframework that makes the writing of tests easy as well as the functionality to easily run the tests and analyse their results.


Features

Fiddler

What is Fiddler?

Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.

Fiddler is freeware and can debug traffic from virtually any application, including Internet Explorer, Mozilla Firefox, Opera, and thousands more.

Visit the Fiddler Download Page...

Friday, April 16, 2010

PHP, PHPUnit, Selenium and NetBeans IDE

Installing Pear
1. Go to the \bin\php\phpX.X.X directory
2. Run the following command
php.exe -d phar.require_hash=0 PEAR/go-pear.phar
3. And then open php.ini, find the key "error_reporting". Set it as below
error_reporting = E_ALL & ~E_DEPRECATED
4. Restart all servers in wamp

Installing PHPUnit
1. Go to the \bin\php\phpX.X.X directory
2. Run the following command
aptitude install phpunit
3. Then the following
aptitude install php-pear
4. Then the following...
pear install phpunit/PHPUnit
5. If you are getting an error as “No valid packages found Install failed” then run the following command
pear upgrade-all
6. Upon successful completion of Step 5, re-run the command in Step 5

If you are not able to create PHPUnit tests via “Create PHPUnit tests” please follow the below steps.

1. Go to the \bin\php\phpX.X.X directory
2. Edit phpunit.bat
3. Verify “set PHPBIN” value. Provide the exact location of php.exe file.
Example: If php.exe and phpunit.bat are in the same directory and if the phpunit.bat shows as set PHPBIN=".\php.exe", it should be corrected as set PHPBIN="php.exe"
4. Verify the value of %PHPBIN% and correct it as required

Installing Selenium in NetBeans IDE
1. Go to the \bin\php\phpX.X.X directory
2. Run the following command
pear install Testing_Selenium-beta
3. Open IDE and go to Tools -> Plugins
4. Install Selenium Module for PHP


Ref by Bhagya's blog

Thursday, March 18, 2010

Adding Zend PHTML extension in Dreamweaver


If you’re using the Zend Framework and Dreamweaver, you’ve probably noticed you can’t open PHTML files in Dreamweaver. Here’s how to add it. You’ll need to modify three separate files:
  1. Open Documents and Settings > [user] > Application Data > Adobe Dreamweaver > en_US>Configuration > extensions.txt. Keep in mind this is for Windows XP and the file may be located elsewhere for other OS’s.Add PHTML to the first line of this file as shown circled below:
    and add it again to the PHP line as shown circled below:




  2. We’re going to do this again but in another location. Open Program Files > Adobe > Dreamweaver [Your Version] > configuration > Extensions.txt and repeat step 1 above.
  3. Open Program Files > Adobe > Dreamweaver [Your Version] > configuration > DocumentTypes > MMDocumentTypes.xml. In the middle of the file there will be a section for PHP_MySQL. You will add PHTMLto it twice as shown circled below:
    Restart Dreamweaver and you should now be able to open PHTML files with normal PHP syntax highlighting.