Thursday, September 3, 2009

Tired of Facebook quizzes? So am I .

 

Really!! I want to know that ?!

Why in the world would I want to know if I can survive a Zombie attack? No thank you Facebook, I don’t want to be shown absurd, irrelevant and sometime inappropriate quizzes.

Firefox to the rescue!! (Sorry IE people, no cookies for you). Let’s remove these quizzes once and for all.

  1. Go here and download Greasemonkey, an awesome add-on for Firefox. While it can change literally any aspect of your browsing, we will be little modest here.
  2. Restart Firefox after installing Greasemonkey.
  3. Go to Facebook Purity userscript page, and click Install. (That’s right in topic, the green button)
  4. Reload Facebook page once again.

Enjoy Facebook the proper way, without stupid quizzes and application.

* This blocks all application in Feeds apart from official one, like Photo, Notes, etc. You might have to say bye-bye to your beloved Mafia Wars and FarmVille updates after this. You can see them if you really want to. Just click on ‘Show’, right above Request link.

blocked

Monday, June 2, 2008

How to get latest Compiz Fusion( 0.7.6 ) on Ubuntu Hardy WITHOUT borking your default installation

When it comes to certain projects, I always try to remain up to date with the latest changes. Projects like Wine and Compiz-Fusion make progress so fast that it's impossible to remain with the older release of the project. Now while Wine can be kept up to date by a trivial addition of repository, there is unfortunately no such repository for Ubuntu for Compiz.
Hence we have to resort to old age method compile from source.
But there is a great risk in removing the default package which comes with Ubuntu, and installing new release over that. Removing the default installation of Compiz may result in failiure while distribution upgrade, and also the Compiz packages may not be dealt with important security updates provided by Canonical. Hence, we choose the way of installing Compiz locally, so as to get up to date new package without removing any older packages.

Now the first step in our journey would be to download all the packages needed for compiling.
In terminal, type


sudo apt-get update 
sudo apt-get install build-essential libxcomposite-dev libpng12-dev libsm-dev libxrandr-dev libxdamage-dev 
libxinerama-dev libstartup-notification0-dev libgconf2-dev libgl1-mesa-dev libglu1-mesa-dev libmetacity-dev 
librsvg2-dev libdbus-1-dev libdbus-glib-1-dev libgnome-desktop-dev libgnome-window-settings-dev gitweb curl 
autoconf automake automake1.9 libtool intltool libxslt1-dev xsltproc libwnck-dev python-dev python-pyrex 
libxcb1-dev

cd
mkdir compiz
mkdir src


Now, go ahead to the download page and download all the files with extension .tar.bz2 at this page as well as Compiz itself to the $HOME/compiz/src folder.
Then, extract all the files to the same folder by right clicking on them and choosing 'Extract here'

Let's compile the source now. Enter to the compiz directory

cd

cd compiz/src/compiz-0.7.6

./configure --prefix=$HOME/compiz

make

make install

Now, be in the same terminal for rest of the procedure. We will then compile rest of the packages one by one

export $PKG_CONFIG_PATH=$HOME/compiz/lib/pkgconfig
cd ../compiz-bcop-0.7.6
./congfigure --prefix=$HOME/compiz
make
make install

After this step, copy the bcop.pc to directory $HOME/compiz/lib/pkgconfig

cp bcop.pc $HOME/compiz/lib/pkgconfig

Then, we continue compiling other required packages

cd ../libcompizconfig-0.7.6
./congfigure --prefix=$HOME/compiz
make
make install

cd ../compizconfig-python
./congfigure --prefix=$HOME/compiz
make
make install

cd ../ccsm-0.7.6
python setup.py install --prefix=$HOME/compiz

cd ../compiz-fusion-plugins-main-0.7.6
./congfigure --prefix=$HOME/compiz
make
make install

cd ../compiz-fusion-plugins-extra-0.7.6
./congfigure --prefix=$HOME/compiz
make
make install

cd ../compiz-fusion-plugins-unsupported-0.7.6
./congfigure --prefix=$HOME/compiz
make
make install

That's it. We are done with compiling all the files. Now is the time to get the wrapper script to start compiz.

Download this file and open it with text editor.
Now search for the term [home path] and replace it with your home path, which is the output of command

echo $HOME

Now, copy the file compiz.wrapper to the directory $HOME/compiz/bin and

cd $HOME/compiz/bin
chmod +x compiz.wrapper
mv compiz compiz.real

All set to go, but first we have to make a important change in 'ccsm' script.
In the bin folder, open the ccsm file with a text editor and add the following lines just to the top of the file.

import sys
sys.path.insert(1,"[home path]/compiz/lib/python2.5/site-packages")

Again, replace [home path] by your home directory address. Save the files and close it.
We are done. Now, press alt+F2 and stop the already running compiz by command

metacity --replace

Back in terminal, type

./compiz.wrapper &
./emerald &

This would start the new version of compiz. If you want to check out new cool feature like spherical 'cube', just type in terminal

./ccsm

Have fun!!

Friday, May 30, 2008

How to setup squid to forward all request to another authenticated proxy

Basically, authenticated proxy are real pain to deal with 'cause every other program seems to take it for granted that it has free acess to net. At the most, you might be lucky if the program supports proxy, without authentication that is.

However, if you are on Linux, don't worry. You can easily setup Squid as a local proxy which would then forward all requests to the authenticated proxy.

From Wikipedia:

Squid is a proxy server and web cache daemon. It has a wide variety of uses, from speeding up a web server by caching repeated requests, to caching web, DNS and other computer network lookups for a group of people sharing network resources, to aiding security by filtering traffic. Although primarily used for HTTP and FTP, Squid includes limited support for several other protocols including TLS, SSL, Internet Gopher and HTTPS. The development version of Squid (3.1) includes IPv6 and ICAP support.


So its basically a swiss army knife for web management, but we will deal with only very basic stuff.

First of all, we need to install Squid itself. Since I use Ubuntu, it is as easy as typing

sudo apt-get install squid

This should install squid and get it running. You can achive the same on Fedora with yum or build from source if you need it.

Next, we have to configure squid to forward our requests to Proxy server.
For this, open the file /etc/squid/squid.conf with your favorite text editor. In my case, it happen to be gedit. Hence we use

gksudo gedit /etc/squid/squid.conf

Now, append the following line to the the file

cache_peer [current proxy server] parent [current proxy port] 0 no-query default proxy-only login=[user]:[pass]
acl all src 0.0.0.0/0.0.0.0
never_direct allow all

Now save the file and exit. Then isuue the command

sudo /etc/init.d/squid restart

Now, you have a proxy running at localhost on port 3128 which requires no authentication.
Enjoy.