Drupal Sprint India 2009

Dexter introducing PLUG @ dsi2009

Drupal Sprint India was a 2 day event held on 30 & 31st October 2009 in Pune and was one of the biggest Drupal Sprints ever held in India, Sprinters from Kashmir, Karnataka, Delhi, Gujrat and almost all regions of India took part in making this event a huge success, this event was divided in mainly 3 parts Sprints, Talks & Workshops, Sprint was sub classified as Code Sprint, Documentation Sprint & The Translation Sprint.

Day 1)

Restrict Multiple Logins in Domain (AD)

I have always asked this question to my colleagues as to "How do i restrict Multiple Logins in an Active Directory Setup"

So here is the answer

Create a file when a user login and check for such file each time the login request is received  if file exists logoff, if file is not present Login and create the file. Its that simple

Below is the step by step process to achieve this using Group Policy

Assumptions:

Random Link for Wordpress Blogs

I recently started my Photo Blog, after various considerations i choosed Wordpress for it, currently i have more than 20 photos posted on it which is not actually a big number but i found that the older images or posts will never be seen to the readers as they don't appear on the frontpage for more than 4-5 days, which created a requirement of creating a Random Link on frontpage to show a Random post to the user if he wants to and this began search for a module or a plugin as its said in wordpress.

But No Luck i found various plugins but i needed something very very simple so i thought going by the code which lead me using the following code in my header.php to create a Random Post link

<?php
$randomPost = $wpdb->get_var("SELECT guid FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY rand() LIMIT 1");

Where .deb files are stored in Ubuntu ?

We always hear people saying ubuntu works well only when you have a strong internet connection as the Install CD doesn't contain all the packages required agreed now a CD cannot contain all the packages you require so you need to download the packages but there is a clear misunderstanding among new users that they always need to download these packages, Its essential to download them once but if you are reinstalling ubuntu on new machine you need not download these packages all over again if you have installed required packages on one of the machine you can use the content of below listed directory for installation

/var/cache/apt/archives

this directory contains the debian packages download by the apt-get :)

so have fun reuse the content for each install and save time and bandwidth

Search Engine Optimization using 301 Redirects

Search Engine Optimizations, i am very sure that all would have heard this term by now, in simple terms its a process of "making your website Search Engine friendly" there are various ways methods to do this, let me be very clear there is no specific way by which you can have a perfectly optimized website, in this post i discuss one of the methods by which you can remove the confusion of a search engine :).

Hosting a Website from Local Machine

I am sure you would have thought atleast once of hosting your website from your machine itself, if not the website atleast a sandbox version of it as it would be comparatively easy for you to maintain it so i discuss the steps you need to follow to achieve this, first lets go through the requirements, in this post i am talking about small sized sites a minor modified version of this post is applicable for large sites as well.

Requirements

1) A really broad Internet Connection.
2) A Static IP
3) A High End Machine (if the site you are hosting is pretty static a lower end machine is sufficient to be more clear a dynamic personal blog kind of site will also never need more than 1000 Mb of RAM unless you are the Top blogger of the country)
4) Server Software (Apache preferred)
5) A Database Server (if needed, mysql/postgresql recommended)
6) Scripting Support (might be PHP. perl, python as per the requirements)

Key Based Authorization with SSH

Using remote shells is all time favourite but remembering those many passwords is a pain so here are the steps to login using SSH without putting a password :)

 

1. Create a public ssh key, if you haven’t one already. Look at ~/.ssh. If you see a file named id_dsa.pub then you obviously already have a public key. If not, simply create one.

ssh-keygen -t dsa should do the trick. Please note that there are other types of keys, e.g. RSA instead of DSA.

2. Make sure your .ssh dir is not publically writable

    # chmod 700 ~/.ssh