Thursday, July 29, 2010

Puzzle




Can you find how many faces are there in this tree.

Detect website virus using firefug

Hi Friends,

If your website get attacked with virus, then you can detect it using the firefox's firebug addon. The common virus attack on websites are adding some unnecessary scripts or iframes within your source code. You can open the site and open the firebug and click on net tab. It will show the un related code in red color with border as show in the below image



Useful URLs for Drupal

Easy Version Control with Git
http://net.tutsplus.com/tutorials/other/easy-version-control-with-git/


http://drupal.org/node/670460

http://www.mig5.net/content/drupal-deployments-workflows-version-control-drushmake-and-aegir

Drupal Development Best Practices: Tools
http://www.chapterthree.com/blog/matt_cheney/drupal_development_best_practices_tools_part_i

Unit testing
http://www.lullabot.com/articles/introduction-unit-testing

Test driven development in drupal
http://groups.drupal.org/node/9412

http://drupal.org/project/drush_make

http://www.workhabit.com/labs/svn-repository-structure-drupal-projects

Deploy with capistrano
http://data.agaric.com/node/2682








Bookmarks

Bookmarks Menu


Recently Bookmarked
Recent Tags

Get Bookmark Add-ons

Ubuntu and Free Software links

Information and resources about Ubuntu, Debian and Free Software in general

Ubuntu
Ubuntu Wiki (community-edited website)
Make a Support Request to the Ubuntu Community
Debian (Ubuntu is based on Debian)

Mozilla Firefox

Help and Tutorials
Customize Firefox
Get Involved
About Us

jCarousel Lite
jCarousel Lite is a jQuery plugin that carries you on a carousel ride filled with images and HTML content. Put simply, you can navigate images and/or HTML in a carousel style widget. It is super light weight, at about 2 KB in size, yet very flexible and customizable to fit most of our needs.
nyroModal :: jQuery Plugin
jQuery UI - Dialog Demos & Documentation
jQuery UI is the official jQuery user interface library. It provides interactions, widgets, effects, and theming for creating Rich Internet Applications.
[SOLVED] strip out image attributes using preg_replace
[SOLVED] strip out image attributes using preg_replace
Home | 10.0.0.1
Resetting a forgotten MySQL root password
Tips for a Debian GNU/Linux System Administrator.
Wilderness | drupal.org
odd behavior when checking if radio button selected in jQuery - Stack Overflow
How to disable directory browsing , APACHE
Blue Flame | Drupal Themes by TopNotchThemes
Page overview with mission statement and three column layout, also content top regionAn alternate page layout, with single left sidebarLower regions, comments, and footer menu and messageHeader showing secondary links, as well as alternate layout with
Drupal Commans
http://localhost/drupal-moodle/course/10
Modules | Drupal Moodle Integration Demo
Using Rss
Overview of Google Reader and RSS

Bookmarks Toolbar

Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar

Most Visited
Getting Started

Drupal

Using CVS to maintain a Drupal website | drupal.org
###Overriding themable output | drupal.org
How Drush Make Just Changed My Life | Drupaler | Drupal Blog, Collaborative Drupal Resource
This is a blog post about Drupal.
Drush - Drupal Shell utility | drupal.org
drush.ws | A command line shell and scripting interface for Drupal.
Customizing the login form | drupal.org
Customizing the login, registration and request password full page layout | drupal.org
Modifying Forms in Drupal 5 and 6 | Lullabot
How to theme a Drupal form | Open Data
####AJAX-ifying Drupal Node Forms | Stella's Website
####Features | drupal.org
Drupal - How to Theme CCK Input forms | Haro Street Media
Hottest 'drupal' Questions - Stack Overflow
Core templates and suggestions | drupal.org
Search config | drupal.org
Custom Search | drupal.org
#################Drupal Tutorial: Form Overrides and Element-Specific Validations | CHROMATIC
This step by step illustrated Drupal tutorial will teach you how to create custom form overrides and element-specific validations with Drupal 6.
###Custom role-dependent User Profies
####### Different Signups for Different Roles Auto Assign Role | drupal.org
Mastering Drupal
Starting Views 2 Documentation | groups.drupal.org
########15 Userful Views Module for Drupal - Ntt.cc
##########Views help index | Views online help
########Creating a module configuration (settings) page | drupal.org

New Folder

Comparison of Lightbox-type modules | drupal.org
Contributer stella | drupal.org

Latest Headlines

PHP

### Use the YouTube API with PHP
The YouTube video sharing site allows Web application developers to access public content through its REST-based developer API. The SimpleXML extension in PHP is ideal for processing the XML feeds generated by this API and using them to build customized PHP applications. This article introduces the YouTube Data API, demonstrates how you can use it to browse user-generated video content; access video metadata, comments and responses; and perform keyword searches.
How-To: Fix SimpleXML CDATA problem in php - Tech Thought
Developer's Guide: Data API Protocol – API Query Parameters - YouTube APIs and Tools - Google Code
Sky is not the limit...
Hacking SlideShare.net using PHP | The Storyteller

General

HowTo: Make Ubuntu A Perfect Mac File Server And Time Machine Volume [Update6] › Kremalicious
For quite some time I use my Ubuntu machine as a file and backup server for all Macs in my network which is perfectly accessible from the Finder in Mac OS X. There are some instructions available in the web for this task but all failed in my case so I wrote my own tutorial [...]
Ubuntu's two big advantages over Windows and Mac | ZDNet
There are two very important areas where Ubuntu Linux has significant advantages over both Windows 7 and Mac OS X. See what they are and join the disc
Useful Links | Stella's Website
### SlideShare » Developer Documentation

Jquery

Using jQuery with Other Libraries - jQuery JavaScript Library

Unsorted Bookmarks

http://10.0.0.1:6056/about

Using Drush to synchronize and deployment drupal sites

Hi Friends,

We can deploy drupal site with different stages like development, testing and production using drush (Drupal shell) and synchronize remote application with local development version.

Ex: drush sql-sync @dev @prod
The above command will Copy the DB defined in sites/dev to the DB in sites/prod.


More info.
http://drupal.org/node/670460
http://drupal.org/project/drush_make


Drush official website: http://drush.ws/

Other drupal useful development tools
http://www.mig5.net/content/drupal-deployments-workflows-version-control-drushmake-and-aegir
http://www.chapterthree.com/blog/matt_cheney/drupal_development_best_practices_tools_part_i

Unit testing
http://www.lullabot.com/articles/introduction-unit-testing

Wednesday, July 28, 2010

Artister - An automated web design tool for joomla, drupal and wordpress theming

Artisteer
It is the first and only tool for web design automation that creates fantastic eye appealing websites templates and themes for joomla, wordpress and drupal.

With Artisteer YOU immediately become a Web design expert, editing and slicing graphics, coding XHTML and CSS, and creating Web Design Templates, Joomla templates, Drupal themes,
Wordpress themes, DotNetNuke skins, and Blogger templates all in minutes, without Photoshop or Dreamweaver, and no technical skills.

Official website: http://www.artisteer.com

Xcloner - For backup and restore Joomla, Drupal, Wordpress and All PHP/Mysql Websites

Hellow friends,

Xcloner is a tool to backup and restore feature for Joomla, Dupal, Wordpress and all PHP/Mysql Projects. You should should like xcloner for wordpress etc., in google for more info.

For Wordpress
http://www.devplug.net/

For Joomla
http://www.joomlaplug.com/Documentation/XCloner_Documentation/XCloner_-_Standalone_Backup_and_Restore.html

Wordpress Vs Joomla Vs Drupal

WORDPRESS
It is just for blogging systems and few cms pages manage through WYSIWYG Editor without more complex form fields integration.

Wordpress Pros
* Simple to use - No need for modifications
* Excellent for blogging or sharing thoughts in a sequential manner
* Even the most elderly of users can get the hang of it quickly

Wordpress Cons

* Not developer friendly
* The community seems to like to complain
* Upgrades bring more bugs than fixes sometimes


# DRUPAL
It is for developers and can hand-code the content of your pages than use a WYSIWYG Editor, or if you enjoy tweaking the code that makes up the framework of a website, then Drupal is probably for you.

Drupal Pros

* Extremely developer friendly. If I loved code more I would almost always pick this system.
* Strong community to help discern the dozens (hundreds) of functions and tags available.
* Can be used to create some really awesome websites that can outperform a majority of other sites out there.

Drupal Cons

* Not very designer and user-friendly. It's hard for someone with little code knowledge to make the leaps required to do the very cool things that Drupal is becoming known for.
* Theming of Drupal has been a huge case of fail (until recently). Probably because it has been developers, not designers, that are making the themes.
* Getting a Drupal website published could cost you more time, and thus more money, than Wordpress or Joomla.


# JOOMLA
It is userfriendly for all type of people i.e designers, developers and admins. Where as it is not so powerful as compare to Drupal.

Joomla Pros

* Friendly for all types of users - Designers, Developers and Administrators
* Huge community is awesome for assisting with creation of websites
* Has been rapidly growing and improving itself for the past three years

Joomla Cons

* Still not user-friendly enough for everyone to understand
* Not quite as powerful as Drupal, and can be a bit confusing for some to jump into
* Recently rebuilt the entire system from ground-up, and so there are still many out there sticking to the old versions (1.0.x)


Drupal Modules: Drupal.org DrupalModules Best Modules BestRank Noupe Appnovation GUI Designer


Drupal Themes: Drupal.org Theme Garden FreeDrupalThemes ThemeBot Mulpo MogDesign GeekTip

Joomla Modules/Extensions: Joomla.org 10 Best Free Joomla21 AJAXLine evoHosts


Joomla Templates: Joomla.org BestofJoomla TemplateMonster Joomla24 Freetemplates Templates.com

Wordpress Plugins: WordPress.org SiteSketch WPHacks VisionWidgets Sadhas BestWordPressPlugins


WordPress Themes: WordPress.org bestwpthemes PageLines TopWPthemes Themes2WP LeVoltz


Ref: http://www.goodwebpractices.com/other/wordpress-vs-joomla-vs-drupal.html

Joomla Vs Drupal

Comparison between Drupal and Joomla

Use Joomla if you want to get nice looking site up quickly and can deal with a slower system, rigid content categorization and limited design/configuration options.

Use Drupal if you want high performance, scalability, good content management and significant design flexibility. But, be prepared to spend a lot of time/money to get the site to look professional.

When caching is disabled Joomla can serve 19 pages per second, while Drupal can serve 13 pages per second. Hence, Joomla is 44% faster than Drupal.

However, when caching is enabled Joomla can serve 21 pages per second, while Drupal can serve 67 pages per second. Here, Drupal is 319% faster than Joomla.

In other words, Joomla's cache system improves performance by 12%, while Drupal's cache system improves performance by 508%.

Monday, July 26, 2010

Important URLs for RoR Developement

Official Website
http://rubyonrails.org/

Great Start
http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial

Examples
http://www.tutorialspoint.com/ruby-on-rails/rails-examples.htm

Sample applications with basic features like authentication and admin features
http://www.railsinside.com/elsewhere/100-7-barebones-rails-apps-to-kick-start-your-development-process.html

Many to Many Relationship with Multi select control in rails
http://blog.coryfoy.com/2008/02/multiselect-control-in-rails-with-a-many-to-many-relationship/

Develop Facebook application
http://www.liverail.net/articles/2007/6/29/tutorial-on-developing-a-facebook-platform-application-with-ruby-on-rails

Use mysql_real_escape_string() function to avoid mysql injections

// Query database to check if there are any matching users
$query = "SELECT * FROM users WHERE user='{$_POST['username']}' AND password='{$_POST['password']}'";
mysql_query($query);

// We didn't check $_POST['password'], it could be anything the user wanted! For example:
$_POST['username'] = 'admin';
$_POST['password'] = "' OR ''='";
// This means the query sent to MySQL would be:
echo $query;
?>

The query sent to MySQL as:

SELECT * FROM users WHERE user='admin' AND password='' OR ''=''

This would allow anyone to log in without a valid password.


Solution:
// Query
$query = sprintf("SELECT * FROM users WHERE user='%s' AND password='%s'",
mysql_real_escape_string($_POST['user']),
mysql_real_escape_string($_POST['password']));
?>
Here mysql_real_escape_string function prepends backslashes to the following characters: \x00, \n, \r, \, ', " and \x1a to make data safe before sending a query to MySQL. So user can't hack your database.

Saturday, July 24, 2010

Wordpress Vs Drupal

Hi, here is my view about where to use wordpress and where to use drupal.

Wordpress
# If your application doesn't contain so many dynamic content forms and have to manage some static pages of information and need a bloging system.

It should suitable company portfolio sites and simple to medium level websites.

Drupal
# If you have multiple dynamic content types (press releases, news articles, blog posts, etc.). Drupal is great at allowing you to create this stuff on the fly, with Wordpress you are hacking things together.
# If your site has more than a two template design structure (homepage and second levels).
# If you have numerous content blocks on the homepage or in sidebars that you will be editing frequently. Drupal’s block system is great at this kind of stuff.
# If you are trying to start small and expect your site to add tons of features/content moving forward.
It should suitable for complex websites which involves so many modules.

How to get driving licence in Andhra Pradesh

The procedure to obtain a Driving License is simple. Follow the below mentioned steps.

Normally this is the process in any State across India. Well, Few Road Transport Authorities (RTA's) could be working as per the local governments periodic regulations.

1. Buy the Learning Licence Forms. These are Form 2, Form 1 & Form 1A(Form 1A is for people aged above

40 years and also depends if your RTA needs it). These forms are available in single click at www.drivingtest.in. Copy or Click the following link and try.

http://drivingtest.in/rta-forms.php

2. Once you are done with filling up of forms, find out with the Road Transport Authoritie’s office, if you have to book a slot for your learners license test. In Andhra Pradesh, one has to book the slot and then practice the questions to clear the test. In Andhra Pradesh the slot can be booked at the link below.

Visit :-

http://www.delhi.gov.in/wps/wcm/connect/doit_transport/Transport/Home/Driving+Licence/Learner+Licence(For Delhi)

http://rto.kar.nic.in/ (click on 'online appointment for LL' for Karnataka)

http://cfst.co.in/cfstonline/LL/TestCenter.aspx (for Andhra Pradesh only)

3. Once the slot is booked, you need to prepare for the online learners licence test which comprises of 20 questions (For Andhra Pradesh). In other cases, walk in to RTA office and pay fee and wait for your turn. The passing mark is 16 where each question carries 1 mark for AP. The number of questions may vary from State to State, however, the questions in this website are the ones normally in the syllabus. In order to practice online you may visit the following link. There are about 250 questions in this website and 10 are free sample learners licence questions. Register to access all the Driving Licence questions.

http://www.drivingtest.in/online-driving-license-sample-test.php

4. To get a hint on the road signs and the traffic signs go to

For knowing all the Traffic Signs http://www.drivingtest.in/road-signs.php

To know about driving tips etc http://www.drivingtest.in/resources.php

5. Once you clear your learners license, you may book a slot for the permanent licence (This is in case of Andhra Pradesh) on the same website as stated above. For other states call the RTA office to find out the availability
of track to be tested for the permanent License. While learning to drive a two wheeler or a four wheeler, kindly keep the road safety and its structure in mind. Read the signs in practical driving test carefully. For further driving tips click on the following links.

http://www.drivingtest.in/driving-tips.php

http://www.drivingtest.in/road-marking.php

http://www.drivingtest.in/offences-penalties.php

Friday, July 23, 2010

Restart live server for your rails application

When you change any modifications in models or configuration files, then changes will not apply in server some times, in that situation you need to restart the server by connecting your hosting server through telnet. Follow the below process

Login through telnet and enter into the application root path
Ex:# ssh root@example.com
Goto application path
Ex: cd /var/www/example.com
Then run the following commands
# mongrel_rails stop
# mongrel_rails start -d

Tuesday, July 20, 2010

Check session expiration in php

/* The below script will check for users inactivity on page, If use open one page, then store the current time on $_SESSION['start'] variable. If he doesn't move cursor or click any key from keyboard for some time, and then if he click on any link it will check his inactive time. if it is greater than the limited time we set here 5 minutes as exmple, then he will redirected to inactive.php page */
?>
session_start(); // NEVER FORGET TO START
$inactive = 300; //means expire within 5 minutes
if(isset($_SESSION['start']) ) { // if session start set
$session_life = time() - $_SESSION['start'];
if($session_life > $inactive){ //if session time expired
header("Location: inactive.php"); //session expired message page
}
}
$_SESSION['start']=time(); //in pageload current time stored in session.
?>

Recommended discussions forums for php

http://www.w3schools.com/
http://www.phpfreaks.com/forums/
http://forums.digitalpoint.com/forumdisplay.php?f=37
http://forums.devshed.com/php-development-5/
http://phpbuilder.com/board/
http://www.phpfreaks.com/forums/
http://www.weberforums.com/
http://www.phpbb.com/community/viewforum.php?f=1
http://www.sitepoint.com/forums/forumdisplay.php?forumid=34
http://phpdebutant.com/
http://www.phpfreechat.net/forum/

Enable SSH access for you shared hosting account in godaddy server

To Enable SSH on Your Linux Shared Hosting Account
1. Log in to your Account Manager.
2. From the Products section, click Web Hosting.
3. Next to the hosting account you want to use, click Launch.
4. In the Settings section of the Hosting Control Center, click the SSH icon.
5. Type your Country Code, Phone Number, and Extension (if applicable) in the corresponding fields and click Enable.

NOTE: SSH requires a strong password. If prompted to change your password, click Change Password, type a new password, and click OK.
6. We call the phone number provided within 10 minutes. Once the connection is established, an automated message plays a message containing a PIN. Type the PIN number into the You will be called with your PIN field and click Verify.
Once verified, it may take 24-72 hours for SSH to be enabled for your account. During this time, you are locked out from the account as it is moved to a new server.

(QA) Testing, Staging and Production environments are now available with Heroku

Hi There,
Deploying application in multiple environements is a better approach for a successfull appliation. This is the default behaviour of the rails application to maintain deployment in development, testing and production environments. Development and testing versions are live on developer's local system and production environement lives on actual server.
Now heroku offers us to maintain the application with these three evnironments in live server withing heroku so that clients and your colleagues can provide feedback and suggestions on your application before pushing them to production.

Ex: If you want to deploy an application called "myapp" in Heroku. First create the production,staging and testing(QA) versions of the application, should use --remote option to override the defaults for the git repository names.

$ heroku create myapp-production --remote production
$ heroku create myapp-staging --remote staging
$ heroku create myapp-qa --remote qa

Now, if you want to deploy code to a particular environemt, do so by specifying the appropriate option
Ex:
$ git push staging master

and if you need to run db migrations use below

$ heroku rake db:migrate --remote staging
Finally, If you probably want to periodically copy your production data into your staging environment:

$ heroku db:pull --remote production

$ heroku db:push --remote staging

Now, when you want to deploy code to a particular environment, do so by specifying the appropriate remote:

$ git push staging master

And if you need to run migrations:

$ heroku rake db:migrate --remote staging

Finally, you will probably want to periodically copy your production data into your staging environment:

$ heroku db:pull --remote production

$ heroku db:push --remote staging

Note: Keep in mind that any environment variables you create or add-ons you add must be duplicated across environments for a consistent experience. For example, if you begin using memcache on your staging app, be sure to install it on your production app before you deploy your new code.

For more details
http://jqr.github.com/2009/04/25/deploying-multiple-environments-on-heroku.html
http://stackoverflow.com/questions/1279787/staging-instance-on-heroku

Thursday, July 15, 2010

PHP For Android

Hi Friends,
PHP For Android project was launched recently and the complete information available in phpclasses.org site in the form of interview with the inventor. The information url: http://www.phpclasses.org/blog/post/125-Developing-PHP-applications-to-run-natively-on-Android-phones.html

Wednesday, July 14, 2010

Free online php code encryption

If you want to encrypt your source to avoid others to modify your code and stealth your code try this one.
http://www.byterun.com/free-php-encoder.php

Easy Drupal version upgradation

The standard to upgrade your drupal application is download the latest version from drupal.org and follow the instructions from UPGRADE.txt file.

Some information regarding version upgrade for drupal is avalible here : http://fuerstnet.de/en/drupal-upgrade-easier

And for quality assurance testing find the information here: http://qa.drupal.org/