Absolutely Tech

[HowTo] Block and Unblock friends on facebook

A lot of my friends have been asking this to me so I’ll just go ahead and make a blog post for everyone. According to facebook:

If you block someone, they will not be able to find you in a Facebook search, see your profile, or interact with you through Facebook channels (such as Wall posts, Poke, etc.). Any Facebook ties you currently have with a person you block will be broken (for example, friendship connections, Relationship Status, etc.). Note that blocking someone may not prevent all communications and interactions in third-party applications, and does not extend to elsewhere on the Internet.

So in essence you become invisible to that person and there is no way he/she can add you back or search for you unless he/she makes a new profile.

Blocking a friend:

The blocking process is fairly simple and most of you already know it:
You just have to click on ‘Report/Block this Person‘ and check the “Block this person” and click on Submit.

Facebook - Block Friend

Facebook - Block Friend

Unblocking a friend:

Unblocking friend is a little different and is a bit difficult to find at first. Thats why people have been asking about that to me.
I’ll show you how to do it: Read the rest of this entry »

[HOWTO] Send emails(using mail function) from localhost in PHP through msmtp (using gmail account) on Linux

There’ve been lots of times when I wanted to use the mail() function on my local server. I am sure lots of you would’ve been wanting it too but most of you would’ve settled for PHPMailer or just used a web host to test the code instead. I myself had been doing the same until recently when I finally decided to do some research and get it to work.

Here are the steps in short for the geeks who like to do things on their own:
All I did was used smtp client called msmtp, configured it to work with my gmail account and configured PHP to use msmtp to send emails.

This tutorial is only applicable for linux users. I’ll write another article for windows users soon when I get my hands on a windows box.
All the commands used in the instructions are for Ubuntu, however you may use corresponding commands for your distro (for eg; you can use yum install instead of apt-get install on fedora, redhat, centos.

Step by step instructions:

Read the rest of this entry »

[HOWTO] Install Opera 10.6 via PPA in Ubuntu

Opera 10.6 which was released yesterday is currently one of the fastest browsers. It has beaten Chrome in javascript speed test. It also features better support for HTML5, WebM video support.

You can now install it on Ubuntu via PPA.

Add the PPA in your repository:


sudo sh -c 'echo "deb http://deb.opera.com/opera/ stable non-free" >> /etc/apt/sources.list.d/opera.list'

Add the key:


sudo sh -c 'wget -O - http://deb.opera.com/archive.key | apt-key add -'

Update your package list:

sudo apt-get update

Finally install opera:

sudo apt-get install opera

Enjoy the all new opera!
Cheers!

[Solved] Unable to enumerate USB device (Disabling ehci_hcd)

Some hardware just don’t work with ehci_hcd on Karmic Koala. My memory stick from transcend refused to work no matter what I did. After plugging the device nothing happened, doing dmesg showed me the following error:

Apr 18 10:59:04 dpac-laptop kernel: [73668.388060] usb 1-2: new high speed USB device using ehci_hcd and address 5
Apr 18 10:59:04 dpac-laptop kernel: [73668.473034] hub 1-0:1.0: unable to enumerate USB device on port 2

After searching a lot, I came to a conclusion that my device doesn’t work with USB 2.0. So I disabled the ehci_hcd to make it work.

Since Karmic doesn’t use ehci_hcd as a module, modprobe -r ehci_hcd no longer works. The module is compiled into kernel. To disable it execute the following commands in terminal:
Read the rest of this entry »

Type in Devanagari in any field on any site

Now, you can type directly in Devangari script on any text field on any website. Thanks to http://code.google.com/p/t13n/

Just drag the link below to your bookmarks bar:
Drag this link to your bookmarks bar

How to use

After a webpage loads, just click on the bookmarklet to enable it. After enabling it, you can type in Devanagari on any text field on that webpage. Just type the words in English and it will be transliterated to Devanagari.

Read the rest of this entry »

[HowTo] Optimize Mozilla Firefox for better performance

Firefox is getting very popular lately, mainly due to its customizability. I use firefox as my main browser and use all sorts of addons which help me in web-development. These addons make my firefox hungry but I can’t do without them. So, instead I tweaked around some settings in firefox which made it much responsive and faster than before.

To tweak those settings, follow the following steps:

1. Type about:config in your address bar and hit enter.
Read the rest of this entry »

Recommended Firefox Plugins

When it comes to Firefox’s plugins, everyone have their own preferences. For me, these are the ones that I like and use the most and according to me are useful for all web-developers are:
Read the rest of this entry »

[HowTo] A trick to get access to protected sites.

Sometimes, when you search in google for something, you find very nice results but when you visit those sites, they seem to be protected i.e; you need to either sign-up or maybe you need to pay for it. So, here’s a way to get access to it without paying or even signing up.

Mostly people want their exclusive content to be protected. Since it is exclusive, they would want people to know about it so that more people join the site. That is why they let search engines to access their protected content so that it gets listed in their results and site gets traffic for that. Now search engines are similar to people. Websites only have one way to differentiate between them – User agents. All the search engines have user agents which makes them differentiate from humans.
Read the rest of this entry »

An alternative to cross-domain AJAX, sort of

Recently, I got a project to make an ad system for a website. The ad system was such that, when the page displaying ad was loaded for the first time, it would create a random link and store them in database. From then on, it would display the same link on same page.

So, I made a javascript file which would create and xmlobject for AJAX request. It would query php file on a server and get the link. But cross domain AJAX just doesn’t work. I tried to edit some parts of it, but it just wouldn’t work. Cross domain ajax requests aren’t allowed for security purposes.

So I had to think of something else. First I thought of renaming php file to js and then addind a code to .htaccess to make it behave like php. Then I thought of making image links dynamically using php’s GD library.
Read the rest of this entry »