Author Archive

How to prevent browser from caching a page in rails

I used devise for authentication in my rails project. After I signed out; I clicked the back button in the browser; Oh!!! the browser was showing the previous page from which I clicked ‘sign out’.  I tested this and found that the browser is caching the page.

I used firebug to analyze the project page(s). I found that the

no-cahe is added

To add ‘no-cache’, I added the following lines @ the application_controller.rb file

before_filter :set_no_cache

and the function

def set_no_cache
response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
end

Restarted the server and found that after I signout and hit ‘back button’ of the browser; the page is redirected to the sign_in page. [ I have configured devise to redirect to sign_in when the session is not valid].

Hope this helps rails users like me.

and I analyzed the rails project page(s) using firebug andThe firebug analyzed results

no-cache implemeted

Popularity: 1% [?]

How to share files between Linux systems

Even for a newbie, the Giver application will be very helpful in sharing files between Linux systems. Giver has been hosted in Google code. Its easy to install and very easy to use. I will explain you how to install and use Giver. I am using the application in Ubuntu 10.04.

Installation

  1. Open the ‘Terminal
  2. Enter the following command. sudo apt-get install giver
  3. This will install the application under Applications -> Internet menu

Use Giver

  • Applications -> Internet -> Giver or enter ‘giver‘ in the terminal
  • Giver application showing the list of Recipients for you

This opens up the Giver and you will see Giver iconGiver Icon in the notification area in the notification area

  • The Giver window will show the list of computers in which Giver is running currently.
  • To send a file to a computer. click on that computer from the list, will popup a menu asking either to send a file or folder.
  • Choose necessary option to show the Open dialog box, [ I am choosing 'Send a file' ]Choose the file and click open.
  • The user in the selected computer will be prompted to either accept the file or decline.
  • After ‘Accept’ button is clicked, the file transfer gets started. once transfer is done both the users were notified.

Sender will be intimated with Successful transfer message

  • You can configure ‘Giver’ where to save the files received; by opening up its preferences. Default location is user ‘Desktop’
  • To open the ‘Preferences’, right click on the Giver icon in the notification area and select ‘Preferences’ Open Giver Preferences
  • The Preferences dialog box will open. You can change your giver name to be displayed for all your recipients, your profile picture and the location where all your received files/ folders are to be stored. After configuring click ‘Close’

Popularity: 1% [?]

Lighttpd Web Server

lhttpd logoLIGHTTPD (pronounced by Lighty) is an opensource webserver for Security, Speed, compliance and flexibility. Its been optimized for high performance environments. With a small memory footprint, effective management of CPU load and advanced features like FastCGI, SCGI, Auth, Output compression and URL rewriting; lighttpd is the perfect solution for servers suffering from load problems.

lighttpd powers several popular Web 2.0 sites like YouTube, Wikipedia and Meebo. Its high speed io-infrastructure allows them to scale several times better with the same hardware than with alternative web-servers. Its event-driven architecture is optimized for a large number of parallel connections (keep-alive) which is important for high performance AJAX applications.

You can check the Lighty benchmark here.

You may be interested in some of the Lighty extension projects,

Lighty2Go – Portable Lighty webserver configured with MySQL and PHP stack.

yPortableWS – Portable Lighty Webserver with MySQL and PHP stack.

WLMP Project – Windows based Lighty with MySQL database server and PHP support.

Popularity: 3% [?]

Apache Open Source Projects – Part 2

This post is a continuation of the previous post ‘Apache Open Source Projects – Part 1 ‘. In this post we will look into other cool projects of ASF (Apache Software Foundation).

James

james-project-logoApache James is a Enterprise mailing Server which integrates emailing protocols such as SMTP, LMTP (from V3), POP3, IMAP (from V3) and Sieve filtering funtioality. Apache James is 100% pure Java application based on the Java 2 platform and the JavaMail 1.3 API. It works alone without the need for any other server or solution. James Server uses Mailets to process emails. There are Mailets APIs available so that user can write their own mail handling code, such as creating archives, filtering mails, update database.

 

mod_perl

mod perlIt embeds Perl interpreter into Apache HTTP server, so that dynamic content produced by Perl can be provided as response to the incoming requests. mod_perl can emulate a CGI (Common Gateway Interface). It provides complete access to the Apache API, allowing developers to write handlers for all phases of Apache Http server. Everything from virtual hosts to authentication settings can be configured via Perl.

 

Pivot

Apache PivotApache Pivot is an open-source platform for building RIA (Rich Internet Applications) in Java. It combines the enhanced productivity and usability features of a modern RIA toolkit with the robustness of the Java platform. It provides a comprehensive set of foundation classes that together comprise a framework. These classes form the building blocks upon which more complex and sophisticated applications can be built.

(more…)

Popularity: 4% [?]

Apache Open Source Projects – Part 1

The Apache Software Foundation is not only famous for its Open source Web Server, it has more open source projects. In this post we will look into some of its cool projects.

HTTP Server

Apache Web ServerIts a widely used and most popular web server; supports differentoperating systems. Since it is an open source software, hosting your web site in this web server will cost you less. This web server supports several server side programing languages which includes PHP, Perl, Python, .Net and Ruby.

Ant

Apache AntAnt is a tool to build Java applications. Its is similar to the Make, theonly difference between these is Ant uses XML to describe the build process where Make uses make file. Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications.

 

 

Directory

Apache Directory Server LogoThis project provides Directory solutions which includes a LDAPv3 compatible Directory Server and a Directory Studio. The Directory Server supports Kerberos 5 and Change Password Protocol. The Directory Studio contains LDAP tools which can be used with any LDAP servers.

(more…)

Popularity: 12% [?]

Accessing Multiple Gmail accounts from the same browser window

I was wondering, it would be great if I am able to login into two of my gmail accounts at the same time from the same browser window. Historically, Google doesn’t allow you to login to multiple google accounts; if you try to login to another user account then Google will prompt you to log off the currently logged in account.

Now its made possible in gmail by the new feature called ‘Multiple Sign-in‘. To enable this feature you need to login into Google account.

Multiple Sign-in Feature

Multiple Sign-in Feature

Click the ‘Edit‘ link in the Muliple Sign-in, you will be forwarded to the page where you should click on ‘On‘ radio button and couple of ‘checkboxes’ and click ‘Save‘. Now, your account is enabled with multiple Sign-on feature.

Sign in to another account

To add another account, click on the Accounts menu at top right side of the Browser menu and select ‘Sign in to another account‘.After you login into another gmail account the Accounts menu will show you both the accounts.

To switch between accounts click the accounts menu and click the appropriate Google account.

Swith accounts

Switch between accounts

Note:

  • As of now this feature is available only for Desktop browsers and not for Mobile browsers.
  • You can use this for the following Google products only :Code, Calendar, Gmail, Reader, Sites, Voice.

Popularity: 6% [?]

How to override the DNS locally ?

Problem:

I was wondering how to override the DNS locally. There is a server in my network having static IP and has a registered Domain name. My local network doesn’t allow me to connect to internet and the server is part of my network, so how do I connect to this server using the same domain name instead of LAN IP or system name.

Solution:

  1. Goto ‘Drivers’ folder inside the system32 folder. “C:\WINDOWS\system32\drivers
  2. Open ‘etc’ folder “C:\WINDOWS\system32\drivers\etc
  3. Open the ‘hosts’ file in wordpad
  4. At the end of this file you will find this  “127.0.0.1       localhost
  5. Now enter the LAN IP of the server and the domain name of the server separated by ‘TAB’ eg., 10.35.68.8          www.yourserver.com
  6. Now you can ping and test the connectivity.

When you do this you are just bypassing the DNS.

Popularity: 8% [?]

How to create an OpenID and use it ?

openid-logo

OpenID

Fed up with creating new accounts for multiple websites, here comes OpenID for the rescue. It allows you to use an existing account to sign in to multiple websites without ‘sign up’. OpenID replaces the common login process that uses a login name and password for every website.

An OpenID is in the form of a unique URL (e.g., http:\\me.yahoo.com\testid), which is authenticated by the user’s OpenID provider. Some of the websites who supports, allows and provides OpenID are Yahoo, Google, ZOHO, Microsoft, AOL, PayPal, Verisign. The OpenID doesn’t rely on a central authority to authenticate the user. The OpenID protocol leaves the type of authentication to the provider, the authentication forms may include passwords and biometrics.

Let us create a OpenID with Yahoo!

  1. Go to Yahoo OpenID website Yahoo! OpenID
  2. Get Started, login with your Yahoo ID

    Yahoo! OpenID

    Yahoo! OpenID

  3. Now Yahoo will display the OpenID URL (identifier) generated for you

    OpenID generated

    OpenID generated

  4. To create custom identifier click on ‘Show customization Options‘. Check for available identifiers, Yahoo recomends not to use mail id as part of the openID as it may expose our mail id. click on ‘Save My Customization‘.

    Custom OpenID

    Custom OpenID

Let us check how to use the OpenID.

  1. Go to Live Journal, click on ‘Login with OpenID‘ in the login page to open the OpenID login page.livejournal-openid-login
  2. Enter your OpenID and click Login (I don’t have account in Live Journal)
  3. This will forward it to Yahoo, where you need to login with Yahoo ID
  4. Now you have logged into Live Journal using OpenID.

The major advantage of an OpenID is you need not create a new account for every website you visit, instead create an OpenID and use the same account to log into all websites you visit.

Popularity: 21% [?]

6 Useful WebTools For Designers

COLOR PALETTE
To create a clean website, color plays a major role.  Selecting the color scheme for your site is made simple by introduction of many tools; you can use the color blender online tool to select your color scheme.
To select the color scheme go to www.colorblender.com and click on the first color box. Change its color by using the RGB sliders below. It will generate 6 color matching palette for the selected color. It also allows you to change all 6 color palette manually by selecting the ‘Direct Edit’ radio button.

colorblender

CSS GENERATOR
Cascading style sheets forms an integral part of the web designing. Use the web tool available in csscreator.com [ link to : http://csscreator.com/tools/cssgenerate] to create style sheets for the HTML elements. Set the properties and click on ‘Generate CSS’.

cssgenerator

LOADING IMAGE GENERATOR
Generating “loading” gif images made easy with the web tool www.ajaxload.info.
To generate specify the “loading” image type, background color, foreground color and transparency and click “Generate It!”

ajaxload_info

ICON FINDER
It’s (www.iconfinder.net )an icon directory, where you can search for icons just as you google, filter it by its sizes and background color.

icon_finder

FAVICON GENERATOR
Use the web tool www.favicon.cc you can generate the favicon. Either import an image or design your own favicon by using tools available.

favicon_generator

WEB 2.0 BUTTON GENERATOR
Go to www.mycoolbutton.com to create free buttons. Generate free icons of your style and need.

mycoolbutton

Popularity: 12% [?]

Process Explorer

It is a advanced process management utility from Sysinternals. It shows you detailed information about a running process like its icon, Image path, command line, current directory, memory statistics, performance graph, network connections, security, environment and more. You can have a closer look of a running process to see the list of DLLs it has loaded or the operating system resource handles it has open.

This utility can be used as a replacement of the standard Task manager of Windows operating system. Like the task manager, you can kill a process or its tree, see the CPU cycles and memory a process takes.

Download the Process Explorer from Sysinternals.

Open the process explorer to see the list of all running processes, its id…

Process Explorer

Process Explorer

Right click on any running process and select ‘Properties’ to see its properties.

In the properties window you can see the process’s icon, image path, command line, current directory.

Process Properies

Process Properies

The TCP/IP tab shows you the network connection status the selected process has made.

Process Network connection lookup

Process Network connection lookup

Process explorer display consists of two sub windows, the default top window shows you the list of all active processes, while the lower pane is shown by selecting View -> Show Lower Pane or CTRL + L or by clicking onProcess Explorer Show Lower pane button icon.

There is two mode of viewing details of a selected process in the lower pane, they are ‘DLL’ mode and ‘Handle’ mode. You can toggle between these modes by clicking on procexp6 toggle button or View->Lower pane view-> DLLs (CTRL + D) ; View->Lower pane view->Handles (CTRL + H).

If the process explorer in ‘DLL’ mode, the lower pane will show the list of DLLs and memory mapped files the selected process has loaded. If it is in ‘Handle’ mode, the lower pane will show the list of handles the selected process has opened.

The Process Explorer also has a search capability that will quickly show you which processes have particular DLLs loaded or handles opened. The process explorer is useful for tracking down DLL-version problems or handle leaks,and provide deep perception of the way Windows and applications work.

Process Explorer does not require administrative privileges to run.

Popularity: 3% [?]

Designed by: Business Web Hosting | Thanks to Buy Icons, travel tips and Used Cars