Browsing posts in: Tips n Tricks

Get the list of packages that got removed from Ubuntu/Debian

My friend accidentally removed the libxml package from his Ubuntu server. And the package manager automatically removed all the other packages that were dependent on libxml, such as subversion, php, apache etc. Can you imagine the state of chaos it is when php, apache, svn and a whole list of god-knows-what packages get uninstalled from a live server 🙂

Well, after the initial moment of FUD, we got the list of packages that got removed by checking the apt log file  which is located at /var/log/apt/history.log and installed them back 🙂  To see the contents of the apt log, type cat /var/log/apt/history.log into the terminal and check for the date you think the files got removed.

Command to see apt log:-

cat /var/log/apt/history.log

 


Facebook Like Automatic Content Loading on Scrolling

We have all seen the automatic content loading used in Facebook. Let’s see how easily it can be implemented using jQuery.

View Demo

What we do to achieve this is whenever a scroll event is fired, check if we have reached the bottom of the page, and if we are at the bottom, call our ajax function to load the content.

 

$(document).scroll(function(){
    if ($(window).scrollTop() + $(window).height() == $(document).height()) {
        // Reached page bottom. Call the ajax function or any other foo here.
    }
});

 

.scroll() is fired every time the user scrolls the page.
$(window).scrollTop() returns the number of pixels hidden ‘above’ when the page is scrolled.
$(window).height() gives the height of the window. Same as window.innerHeight
$(document).height() gives the total height of the page.

Well, that’s that. Cool, right?

Facebook content Loading

Automatic Content Loading in Facebook


Run multiple Firefox instances/versions at the same time

Here is a quick tip for ya. To run multiple instances of Firefox at the same time, do the following.

Firefox Profile Manager

Linux

1. Run this command in Command Terminal : firefox -p -no-remote

2. The Firefox profile manager will open and ask you to choose the profile you want to use. If you already have more than 1 profile, click on the “Create Profile” button to create a new profile and once the new profile is created, select it and click “Start Firefox”

3. That’s all.

 

Windows

1. Open run prompt by pressing Windows key + R

2. Run this command in run : firefox.exe -P -no-remote (NB: -P is in CAPS)

3. The Firefox profile manager will open and ask you to choose the profile you want to use. If you already have more than 1 profile, click on the “Create Profile” button to create a new profile and once the new profile is created, select it and click “Start Firefox”

4. That’s all.

 

You can also edit the Firefox short cut in your desktop, quick launch (Windows) or panel (Linux) and add the text -p -no-remote to it, so that each time you open Firefox it will ask you to choose the profile you want to load.

 

What is this good for?

1. You can sign into multiple Gmail accounts (or other accounts for that matter) at the same time (One in each Firefox instance)

2. You can run multiple versions of Firefox at the same time. Just create a separate profile for each version and choose the correct profile when opening Firefox.

 

Did it solve a different problem for you? Let others know through the comments below.


7 Points to Stay Safe in the Social Web

Facebook Population

How many of those people you know doesn’t have a Facebook account, or an Orkut or MySpace account? I won’t be surprised if you say your 90yr old grandmother is tweeting or your 3yr old brother is playing mafia wars in Facebook 🙂 With the ever increasing participation of people in social networking sites, the more vulnerable their security is being. As this Mashable post says, a guy named Israel Hyman posted this status message in his twitter account saying he’s enjoying his excursion to Kansas city. Later, he returned home to see that his house had been burglarized.

Ok, now let me tell you how to stay (relatively) safe on the social web.

1. Use Strong Passwords

This is the most basic rule. A complex password may be difficult to remember, but it is worth it, believe me. If you know your dad’s high school sweetheart’s name, try it as password in his mail account or Facebook account. You have good chances. Personally my mother still uses my dad’s nickname as her Gmail password. Using simple, easily guessable passwords is most common in less tech savvy people, like your parents, uncles or high school principal. Recently, a social media website called TeensInTech was hacked and a lot of confidential information were compromised. Later after investigating the issue, the company said that their easily guessable password is what gave them in.

2. Avoid easily guessable Security Questions.

Almost all websites including social networking sites rely on security questions for the purpose of retrieving account access incase if password is forgotten. Using easy to guess security questions is a more common scenario than that of using simple passwords. There was this guy in my college I had a grudge against. I found out his email id from his Orkut profile page. It was a Gmail account. I tried the ‘forgot password’ option in Gmail. I was presented with the security question he had set – “What is my college?” 😀 You guess what happened next. There was another guy whose security question was “What is my country?”. I searched for his name in Google and found that most of the results were related to brazil. So I could easily guess that he was Brazilian. Even if that is not the case, any stupid can see that there are less than 300 countries in the world and it is only a matter of time before guessing the correct one.

Avoid questions like these:

  • My mother’s maiden name? – your relatives may know that.
  • What is my pet? – Your neighbors may know that.
  • My first teacher? – Some of your friends may know that.
  • Where did I first meet my boyfriend/spouse? – At least your boyfriend knows that 😀

There are loads more.  Besides these guessable questions, avoid questions which can have only a limited set of answers, like these:

  • Which month am I born in? – It is only a matter of trying the 12 possibilities.
  • My favorite flavor of ice cream?- It is more than easy to guess, unless you are some weird Eskimo chef 🙂

3. Share less / Share wisely

The main agenda of social networking sites is to make you feel like sharing the most. These sites will make you think that it is a good thing to share everything. You will be even given option to marks some of these information as ‘private’, so that only those in your friends list will be able to see it. Believe me, you can trust no one. You won’t believe if I tell you the number of guys who have asked me to crack their girlfriends’ mail id. I regret to say that I once cracked one of my best friend’s email account, just for fun. I felt terrible after doing so, so I confessed – after a few months!

Your personal information like zip code/postal code, mobile number, birthday etc can be used to retrieve your accounts if forget your password. So it is very important to to share wisely.

Try not to share the following information in social networking sites:

  • zip code
  • address/exact location
  • email address
  • mobile number
  • birthday
  • And other similar information.

4. Add people only  you thoroughly know as your friends

Increasing our friends is one of the thing social networking sites have been doing all these days. Even 5th grade kids seem to have 999 friends. To increase our connections, these sites present several options – importing email contacts, friend suggestions etc. It is not rare getting friend requests from people we hardly know. Most of the time, we accept all the requests, just because we don’t want to say no, and appear to an anti-social jerk. Sometimes you get friend requests from total strangers, and you will accept them just because he is from your state or district. Don’t Do That.

There is this new kind of attack method crackers/hackers are using, called Social Engineering, where hackers gather your personal information and use it to access your online accounts, reset passwords etc. So as I said, when you get a friend request, examine his profile thoroughly and accept the request only if you are fully satisfied. Never accept the request if you have at least a lil bit doubt left.

No, it’s not done with yet.

Even if the friend request is from a close friend or a person you know very well, there is a good chance that you are being manipulated. It is easy for a hacker to create a copy of one of your friend’s profile and send the request. So when you get a friend’s request, first check whether he’s already in your friends list. If you already have the same friend in your list, bet one of them is fraud. If possible, call the friend and ask him whether he just send you a friend request.

5. Do not Over-Tweet.

Twitter is the most trendy social web service now. Every cat, cow and corporation now has twitter account. When it comes to posting status updates in twitter, people seem to think that it is okay to post anything. And they post information which would’ve been kept confidential otherwise.

Know your audience (followers)

If you plan to tweet about utterly personal things, it is better to keep your tweets private. If you set your tweets to be private, your status updates won’t appear in the public timeline as you post them and will not be searchable. If your friend or brother wants to follow you, you will be asked to approve first and then only they will start getting your tweets.

Even if you are just comfortable with keeping your tweets public and wants to keep them so, then it is okay, but keep an eye on what you are posting.

6. Use the address bar to visit the site.

Trust the address bar.

Do not trust links.You may receive emails, saying ‘you have one friend request, click this link to accept’ or anything like that which can be extremely convincing. Do not click on links you receive in email to log into your social networking sites. These links may lead to bogus log in pages that may exactly look like the original login page. And once you enter your username and password into it, hoping to log into the original site, rest in peace.

Bu
t if you want to log into your Facebook account or Twitter account, use your browser’s address bar to type in the address of the site. Also before entering your login details in the site, make sure the address in the url is Facebook itself. Phishers (hackers) can employ addresses similar to the original site. So it is good to double check the address. For instance, I can create a fake Facebook login page in the address www.facebook.com.login.devildesigns.net. The address looks like a genuine one (www.facebook.com) in first look. But it is actually a sub-domain, which anyone can easily create. Only careful look can make out the difference. Tip: There is this Firefox addon which highlights the original root domain. See the screenshot below.

location-bar

You can see the root domain (mozilla.com) is highlighted.

7. ..And finally, Trust No One.

Just keep in mind that everyone you meet online has a good chance of being a malicious user. Trust no one (even if he’s claiming to be ur dad. no no, uncle. okay?). The world wide web is a magical world where anyone can be everyone and everywhere. One can easily disguise as someone else. When next time you get a tempting friend request from a hot young lady, just keep in mind that probably it is some fat, balding guy with his …h…d…hangin s… e … w c (guess it is enough 😉 )

Let me know your opinions/ideas through the comments.

Lighter Side

Identity Theft

Image Source: Flickr


How to find what language it is written in..

Update: This post is a bit old. For one thing, Google Translate now automatically detects language. Also better technologies for the same might have come up since I published this first.

I recently got a scrap in my orkut profile. It looked like total rubbish coz the language it was written in was totally unknown to me.

Google’s Translation service is very good and I thought of decrypting the scrap through Google Translate. Once I reached Google Translate,  I pasted the entire scrap in the box provided there… Then there was another problem.. I couldn’t specify the source language (ie, from which language to english) Aah.. then I got an idea(!!). I just pasted the whole scrap message in Google Search and searched it. Then I examined the URL’s in the search results. Amazingle, most of the search results came from sites with cc TLD (Country Code Top Leve Domain, like .in, .us etc) .br. That means thar most of the search reults are from Brazilian sites..

Yay!! So the language I got the scrap was the ‘Brazilian language’
. So which is the language of brasil, the easiest way to find such facts is google, as always. I just searched ‘language of brazil is‘ in google and it was written in the topm of the results page that ‘Portuguese’.

Now this were easy. I went to google translate and gave the source language as portuguese and destination language as english. Then Google translated it for me.  Cool na?? 🙂


How to redirect voice from your microphone to your speakers.. It’s cool

rock-singer

You ever wanted to sing on a mic?? I did, but I was (am!!) too reluctant to do so in a public stage. Aah, so in fact I never did it..  until..

So now we are going to redirect the voice from your microphone to your speakers. Sounds cool na? And no additional software is required.

  • Right click on the speaker icon in your system tray.
  • Select ‘playback devices’ >> ‘Speakers’
  • Choose ‘properties’ >> ‘Levels’
  • And then unmute the mic symbol (if there are two mic symbols, unmute ‘front mic’) and increase the volume

Now plug in your mic (or the mic jack of your headphone) and turn up the speaker volume….

… and rock the walls.

[ The configuration instructions are based on windows vista, hope it will be easy to find them in xp too, if you encounter any problem, let me know.. ]


Retrieve flv videos (and other files) from firefox cache.

Yesterday my friend sent me a link to a video in his site. I saw the video as streaming and I liked it. I just wanted to keep a copy of it in my collection. So as usual I went to keepvid, my favourite YouTube grabber site. But I couldn’t download the video because the site was not supported. Well these grabber sites do not support the majority of the streaming video sites, coz they are so many of them using different encoding  methods. It was then I thought of it – prior to playing the file, firefox (or any other browser) keeps a copy of the video in its local cache. So I googled to see if there is an option to save cached files, and came up with these..

Tool: Go to http://www.nirsoft.net/utils/video_cache_view.html, there you can download ‘Download VideoCacheView’. This tool will allow you to see all flv videos in your cache..Remember again – you can browse only flv videos using this tool. It is a freeware.

Screenshot

Or click here to download the file directly.

Trick: Ok here is a neat trick to save any file from your cache. If you are using firefox, in the address type about:cache and hit enter. The resultant page will display various information about your cache. On that page click on the link List Cache Entries, and you will get a detailed list of all files that are currently in firefox cache. If you want to save any of those files just browse to the cache folder – it is given at the bottom of the first page (about:cache). It looks something like this 'C:\Documents and Settings\copzz\Local Settings\Application Data\Mozilla\Firefox\Profiles\j1l44nro.default\OfflineCache'. Now browse to this folder and copy and save the file you need into another location and change its extention to whatever it is, like .jpg .flv etc.

And you are done. Happy caching.


Manage multiple email ids from your Gmail id.

Gmail LogoMost of us keep more than one email id. We may be keeping one for personal communication, one for business communication etc. But it is really difficult to keep up with multiple email ids. You have to check all these ids for any incoming message or to send any mail from those.

But now with gmail, you can completely manage your other email ids with a single id. For the case of incoming messages, you can set to forward all the  messages coming to that id to your gmail id.(ie, if you configure to forward your emails, you can read emails sent to [email protected] from [email protected]). So the problem of incoming mail is saved for now. You can find the mail forwarding option in gmail >> settings >>forwarding >>

And if you want to send a mail from another account, that is also possible with gmail. In Gmail >> Settings >> Accounts >> , you can configure other email ids. Gmail will send a confirmation message and once you confirm the ownership of the other email id, you can start sending emails from those ids from your accounts.That is., if you set [email protected] to be your additional email id, then after confirmation you can send emails ‘from [email protected]’, right from the gmail id- [email protected]. Nice isn’t it?


How to block websites without additional software

Stop

There is a simple way by which you can block any site from being accessible from your computer. There is a file called “hosts” located at C:WINDOWSsystem32driversetc. Now open that file in Notepad. This file is used to map domain names with IP addresses, locally within your computer. So whenever you type a domain name (say google.com) in your browser, the browsr first checks if the domain entry is in this “hosts” file. If not present (in most cases), the browser will lookup external servers.

Now the trick, if you want to block google.com, assign the domain name google.com to the ip 127.0.0.1 (127.0.0.1 is the address of your own computer, commonly known as ‘localhost’) or assign it to any other value such as 127.0.x.x.

Now every time you enters google.com, it goes to 127.0.0.1, ie your own computer. So virtually you have blocked it.


Customize registration emails from your wordpress blog

I Love WordPressHey, since my first installation of wordpress, I love this publishing platform very much. But there was something that didn’t make me very happy, that was the confirmation email. When a new user registers in a wordpress based blog, a confirmation email is sent to him. But the email says that it is from ‘[email protected]‘ and the sender name was ‘WordPress’. I wanted to change it to something like ‘[email protected]‘ or ‘[email protected]‘. I searched for an option to customize this in the dashboard. When I had no luck, I tried to find the corresponding code in the source code. Still I had no luck. I searched almost the entire web, Yahoo! Answers and everything, no clue.But finally today when I was just searching through the WordPress Plugin Directory, I saw something there, sure a plugin, just for changing the from address and sender name of the registration email.

Download the plugin


Pages:12