Wednesday, September 15, 2010

Twitter Version 2.0.10(2010)

Twitter has unveiled its new version( say version 2.010) that changes the interface, introduces new features and promises to be "faster, easier and richer." This will have a double-paned view of things. Quite frankly, it uses a lot of the wasted space on the page.

Each pane will take up half the screen. The left-hand column will contain the regular old timeline of Tweets. Click on a Tweet, and the right hand pane shows the details of the Tweet, including the user profile of the sender, the conversation it's in, and more. Videos and pictures can be seen in the right pane.

Some of the welcomed features of this new twitter are as follows:
  1. Two-pane interface:
    The new interface is clean and well organized. Lists and trends are easier to view (requiring less scrolling) than with the old Twitter.
  2. Embedded media:
    New Twitter will display the photo on the right half of the page . You'll also see more information such as other tweets that have linked to that same image. Videos, too, will be embedded. If you click on a tweet containing a link to a YouTube video, the video will play right on right-hand pane instead of redirecting you to YouTube. This eliminates the hassle of closing multiple browser tabs once you're done viewing. 
  3. Continuous scrolling:
    In the new Twitter, the "more" button at the bottom of the page used to load older tweets will be gone. Now, you'll be able to scroll through older tweets continuously, without having to manually load more.

Tuesday, September 14, 2010

Software Freedom Day 2010

Change is FOSSible

Software Freedom Day (SFD) is an annual worldwide celebration for promoting use of Free/Open source softwares(FOSS) as a competitive alternative to proprietary software in education,government ,buissiness , and other applications.  SFD is a public education effort with the aim of increasing awareness of Free Software and its virtues, and encouraging its use.
  This year , SFD 2010 will be held on September 18th Saturday.

More from SFD website

  

Vision & Objectives

Our vision is to empower all people to freely connect, create and share in a digital world that is participatory, transparent, and sustainable.

Objectives

  1. to celebrate software freedom and the people behind it
  2. to foster a general understanding of software freedom, and encourage adoption of free software and open standards
  3. to create more equal access to opportunities through the use of participatory technologies
  4. to promote constructive dialogue on responsibilities and rights in the information society
  5. to be inclusive of organizations and individuals that share our Vision
  6. to be pragmatic, transparent, and responsible as an organisation
Related Websites:
  http://softwarefreedomday.org/
  http://wiki.softwarefreedomday.org/
  http://en.wikipedia.org/wiki/Software_Freedom_Day

Friday, May 28, 2010

Automatic wallpaper changer script for Linux

I always want linux to compete with windows. In windows 7 , wallpaper changes automatically .So i wrote this script .

#!/bin/bash

#author IRFAN NASEEF P
#       irfan@nitc.ac.in
# please report bugs to the author

# Usually the background pics are stored in /usr/share/backgrounds

cd /usr/share/backgrounds

num=`ls | wc -l`
#echo $num
choice=`expr $RANDOM % $num`
#echo "choice is $choice"
filename=`eval ls | head -$choice  | tail -1`
#echo "That is $filename"

if [ -f $filename ]
then
gconftool-2  --type string  --set /desktop/gnome/background/picture_filename "/usr/share/backgrounds/$filename"
else
  #echo "$filename is not a file"
  exit 1
fi

exit 0


#####

You can run this script in crontab for automatic changing of wallpaper.
Or you can put it as a nautilus-script .

Saturday, April 24, 2010

script to copy file to remote server (Using scp)

I always want to copy files to my athena account, which is the server in our lab where i have an account.So i wrote this script , which helps me not to write a long line command always.

#!/bin/bash
#
#Author: IRFAN NASEEF 
#
#

if [ $# -lt 1 ]
then 
  echo "Error:Specify atleast a file"
  exit 1 ;
fi

echo "Specify Destination folder"
read dest;

for file in $@
do
  if [ -f $file ]
  then
    echo "Copying file $file to $dest"
    scp $file b070147cs@192.168.40.99:$dest
    if [ $? -eq 0 ]
    then
      echo "Successfull"
    else
      echo "Error :copying" 
    fi
  else
    echo "Error: $file doesnot exist"
    exit 2 ;
  fi
done 

exit 0;
#############################################

And if you have done as per this post(see here) , you can save typing passwords too .

Saturday, April 17, 2010

PHP script for getting tweet updates

Here is the php script to get updates from a twitter account.

   $uname = "YourUserName";
   $url = "http://twitter.com/statuses/user_timeline/$uname.rss";
   $rss = @file_get_contents($url);

  if($rss)
  {
          $xml = @simplexml_load_string($rss);
          if($xml !== false)
           {
                 foreach($xml->channel->item as $tweet)
                  {
                       echo $tweet->pubDate."\n";
                       echo substr($tweet->description,10)."\n";
                   }
            }
           else
             {
                   echo "Error: RSS file not valid!";
             }
       }
       else
      {
          echo "Error: RSS file not found, Invalid username";
      }
?>



Thursday, April 15, 2010

Downloading youtube videos

There are lot of ways you can download youtube videos.I will mention a few online downloaders..
Different methods are here:
  1.   Replace youtube in the URL by voobys
     If the url of the video is http://www.youtube.com/watch?v=4k2_HHrk8Y8 ,change it to  http://www.voobys.com/watch?v=4k2_HHrk8Y8 , You can download the video from this link.

   2) Add "kiss" to the youtube URL
         So change the above url as  http://kissyoutube.com/watch?v=4k2_HHrk8Y8
 
   3) Add ok to the URL
           Change url as http://okyoutube.com/watch?v=4k2_HHrk8Y8

  4) Some other webpages where you can download youtube videos:
  5) For those who prefer command line terminal , use Youtube-dl package . You can then  download the video by typing   youtube-dl 
But remember downloading vids is forbidden by the Terms of Service of youtube and in some cases illegal.You can watch them on YouTube and you can, providing the video owner lets you, "embed" them to other sites using the code beside the video you want to show off elsewhere.  And you can use the email function to send them to people who you want to show it to.
All that is done on YouTube, directly on the video's page itself.  :)

Monday, April 12, 2010

Searching mails in Gmail

Recently i was searching for a method to get all my unread mails from my inbox in gmail. I felt it very difficult to search for it manually .So as usual i googled for a solution .I was really surprised to see the power of gmail search mail option. You can simply give a search for
is:unread
.All the unread mails will be listed..wow..nice one isnt ?

See below options too .

Keyword what it will do ?

from:abc --- get all mails from abc
to:abc --- get all mails send to abc

is:read --- get all read mails
is:unread --- get all unread mails
is:starred --- all starred mails

in:inbox --- mails in inbox
in:trash --- mails in trash
in:spam --- mails marked as spam

Many options are there.. Get the entire list from See here

Sunday, April 04, 2010

tweeting from the BASH terminal

i feel this an awesome script..tweet from command line terminal in linux..
script is as follows:

#!/bin/bash

username="yourUserName" ;
password="yourPassword";

URL="http://twitter.com/statuses/update.xml" ;

if [ $(echo "$1" | wc -c ) -gt 140 ]
then
echo "Whoo: Its more than 140 characters"
exit 0;
fi

result=$(curl -u $username:$password -d status="$1" $URL) ;

exit 0 ;

save this in some file name "tweet" and make it executable ( chmod +x tweet )
And for simplicty add an alias ..
Now tweet from terminal using the command
tweet "tweeting from the command line"

Monday, March 22, 2010

Add file to VLC playlist by right clicking

I found a simple nautilus script which is very usefull for those who usually plays something in VLC. Script to add a file to VLC playlist by simple right clicking on the file .

What to do ?


cd ~/.gnome2/nautilus-scripts

touch "Add to VLC Playlist"

then copy the following to the file "Add to Playlist"

Pre-requisite: Install zenity from your package manager


#!/bin/bash

## Ny Narendra Sisodiya, for SchoolOS
## narendra.sisodiya@gmail.com
## modified by: IRFAN NASEEF P
##             irfan@nitc.ac.in

checkFileType()
{
  file $1 | grep -i "audio" || file $1 | grep -i "video" || file $1 | grep -i "ogv" || file $1 | grep -i "mpeg"
  RES=$?
  if [ $RES -eq 0 ]
  then
      return 0
  else
      zenity --error --title "VLC says: " --text "Error: $FILENAME is not an audio/video file"
      return 1
 
   
   fi
}

IFS=$'\n'
for FILENAME in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
do
  checkFileType $FILENAME

  if [ $? -eq 0 ]
  then
    vlc --started-from-file --one-instance-when-started-from-file --playlist-enqueue "$FILENAME"
    
 fi
done

exit 0

################

Then save ..

Now you can see a 'Scripts' option when you right click , and a 'Add to VLC Playlist' in it. Now you can directly add files to playlist by simply right clicking .

Thursday, February 25, 2010

Showing less than "<" symbol in blogger post

For my last post on an interview test , i came accross a situation to show a less than symbol near character 'b' like < b (without spaces).But blogger misinterpret me and the post was made bold.Then i tried giving the standard HTML symbol for less-than < , but of no use. So from a google search i found this solution. You can give & # 60 (without spaces.I gave spaces to show you ). That works ..

Microsoft Internship Test Questions

Today i attended the Microsoft's Internship test . Here i am posting the questions so it will be useful to you too..
It was a one hour long descriptive test with six questions. The first four carries 5 marks each and remaining two carries 10 marks each.

  1. You are given a character string . Write the algo to print the character with maximum occurence and print that number of occurence too.
    Eg: i am an hacker --> output should be 'a' 3 times
  2. Give the output of the following code:
    #include<iostream>
    using namespace std;
    
    int main()
    {
    int a=10,b=2;
    b=a+++a;
    cout<<b<<" "<<a"\n";
    return 0;
    }
    
  3. Give the pseudocode for finding the factorial of a given integer.Make sure that the number should be of atmost two digits.
  4. What is Early binding and Late binding.
  5. You are given with a tree. Write the algo to make sure that it is a binary tree.
  6. You are given with a software application to send an email. write the testcases to check the working of the software.
  7. (There was a picture here ..showing the working of email sender application.i cant waste time by drawing it.)

Tuesday, February 23, 2010

Amazon Interview questions

I recently had an interview for internship by Amazon . Here i'm posting the questions asked during that . There were about four questions , out of which one was coding .

1) Consider you have a list of 2n+1 elements. n elements in the list have one duplicate. Give the algo to find the remaining unique element(the element without duplicate) ? { Eg: array 5 2 4 4 2 1 5 : here 1 is the unique element }

Modify the algo , if we have many elements without duplicate ? { Eg: array 5 2 4 4 1 7 2 3 5 here 1 7 and 3 are unique ie without duplicates }

2) Consider a singly linked (non circular ) list . Give the algo to find the pointer to the k'th element from the last , in a single iteration through the list .

3) Consider you have an array . the elements are arranged as in increasing order till a peak element , and from this element onwards it decreases..Give the algo to find this peak element .{ Eg: array : 2 3 4 5 6 3 2 1 : here 6 is the peak element. }
Modify your algo to take care of multiple peak elements . { Eg: array 2 3 4 5 6 3 2 1 5 8 9 2 1 here we peak elements are 6 9

Coding :
Write a definiton for the function with prototype given below:
Reversal(pointer to head of list, an integer k )
This function takes a list and an integer k, and reverses the first k elements of list and return a pointer to the head of new reversed list .

Thursday, February 04, 2010

Open Office Recovery problem

Yesterday when i was creating my assignment document in open office, some how it crashed .so i gave a force quit.Then when i restarted open office , it shows a window saying " openOffice.org Document recovery ", and the problem was that , it neither recovering my document nor allowing me to open a new one .screen shot added here:



WTH. So i think this post will help those having the same problem .

To solve this problem , just goto your home folder. Press ctrl + H to show hidden files. Get into the folder as shown : ".openoffice.org" -> 3 -> user -> registry -> data -> org -> openoffice ->Office . Delete that "Recovery.xcu" ( DONE ). Now just restart your open office..It will work without any problem ..

Sunday, January 03, 2010

One Laptop Per Child ( OLPC) Project

The One Laptop Per Child Association,(OLPC) is a U.S. non-profit organization set up to oversee the creation of an affordable educational device for use in the developing world. Its mission is "To create educational opportunities for the world's poorest children by providing each child with a rugged, low-cost, low-power, connected laptop with content and software designed for collaborative, joyful, self-empowered learning." Informally the chairmen says that the mission is to eliminate poverty. Its current focus is on the development, construction and deployment of the XO-1 laptop.

The goal of the foundation is to provide children around the world with new opportunities to explore, experiment, and express themselves. To that end, OLPC is designing a laptop, educational software, manufacturing base, and distribution system to provide children outside of the first-world with otherwise unavailable technological learning opportunities.

GET INVOLVED :
Posters: Print these stuffs in your neighbourhood


Download poster 1 Download poster 2 Download poster3

FOSS meet 2010 at NIT calicut

FOSSMeet is an annual event on Free and Open Source Software at National Institute of Technology Calicut. This event brings together FOSS enthusiasts from all over India. The 2010 edition of the event is scheduled to be held during February 5 to 7, 2010.

It started as FLOSS Meet @ NIT Calicut in 2005 which was a single day event. It is being conducted at NIT Calicut annually since then. During this period, it has evolved into one of the biggest Free Software conferences in India.

FOSSMeet 2010 is the 6th edition of this attempt at popularizing Free and Open Source Software in India.

visit: http://fossmeet.in/
Follow twitter updates: