Kurinchi Blogger Scribbles …


Archive for September, 2009

Sep 29
2009

How to reset the screen terminal output?

Last updated: September 29th, 2009

You might have come across instances like trying to print or output the content of binary files or similar instances when the screen spews out unreadable set of characters which then would disrupt the normal display of characters.

stty” is the command that is used to reset your screen content.

$ stty sane

Sep 24
2009

Headstart to capture screenshot of web pages

Last updated: October 8th, 2009

Following plugins will help you create php/perl/ruby module that will grab a screen shot of the web page

Thumbshots.org or Thumbshots.com
Thumbalizr
PageGlimpse
SnapCasa

Sep 10
2009

Generating Certificate for validation (CSR generation)

Last updated: September 10th, 2009

In order to install SSL certificates on your Apache server you need to generate a key pair and a CSR (certificate signing request) as the first step. The following points will guide you in the creation of CSR file.

Once you finish generating the CSR file, you need to paste the content of the CSR file on to the SSL certificate request page in order for the certificate authorities to start their verification process.

Command line prompts in a Linux box

Find where openssl is installed and navigated to that directory
$ whereis openssl

Mostly it will be at /usr/bin/. If it is in a different path, then navigate to that directory path
$ cd /usr/bin
(more…)

Sep 05
2009

How to open ALL external web sites or references in a NEW window?

Last updated: September 24th, 2009

Using JQuery to open external links in new windows

Earlier we used to write a string of code in javascript to enable opening external references in a new window in addition to modifying the html code

With JQuery, this can be done with one line of code as shown below

$(document).ready(function(){
    $("a[@href^='http']").attr('target','_blank');
});

The above line checks for occurences http in a tag and if a link has “http” in it, JQuery opens the link in a NEW window.

According to W3C standards, the target attribute has been removed from xhtml 1.1 specification.

Sample script to open external links in New Window

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB">
<head>
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script language="javascript">
$(document).ready(function(){
    $("a[href^='http']").attr('target','_blank');
});
</script>
</head>
<body>

Testing the pages - Open Links in new <a href="http://yahoo.com">window</a>.

<h1><a href="http://www.kurinchilion.com">Kurinchilion</a></h1>
</body>
</html>
Sep 02
2009

CakePHP: NuSoap web service call configuration

Last updated: September 3rd, 2009

This is a beginner tutorial to help beginners make a call to “wsdl” files and for them to display the results returned by the service.

First step is to include “nusoap.php” in \vendors folder in cakephp setup. In the controller, we make a call to nusoap.php by the statement App::import(‘Vendor’,'nusoap’);
(more…)

Sep 01
2009

cakephp Deprecated: PHP 5.3 Wamp

Last updated: September 2nd, 2009

Error message
cakephp Deprecated: Assigning the return value of new by reference is deprecated
You will see the above error message when you try to configure cakePHP framework using a Wamp Server installation and set the debug parameter as in

Configure::write(‘debug’, 2);

Cause: CakePHP is not PHP 5.3 ready unlike the latest version of Zend framework.

Remedy: Try downloading older version of PHP – e.g. PHP 5.2.9


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict