Monday, December 20, 2010

Speeding up torrents in uTorrent

Most common reason for slow torrents is that the number of seeds are low or the upload speed of the seeds is limited. To overcome this problem

right click the torrent in uTorrent and select copy magnet URI. The magnet URI is similar to
magnet:?xt=urn:btih:RB4BJJ65RL6OEA5STGYG4ER6WW2K5DFX
here RB4BJJ65RL6OEA5STGYG4ER6WW2K5DFX is a 32 bit hash code

go to http://darkfader.net/toolbox/convert/ and convert the 32 bit hash code into 16 bit hash code. And search for the resulting 16 bit code. The search will give alternate download locations. Download the .torrent files add them to uTorrent and allow uTorrent to add trackers from the file.

This approach will be helpful if the availability of the torrent is low or to verify the authenticity of the torrent

Thursday, November 25, 2010

Take snapshot of an web page

After some searching i found CutyCapt to suit my needs.

After successful installation it gave me the error
QPainter::begin: Paint device returned engine == 0, type: 3

After some searching i found out that that error means that QImage::__construct is failing.
The constructor is failing because i am behind a proxy and CutyCapt did not find any content to create an image

./CutyCapt --url=http://www.google.org --out=example.png --http-proxy=http://144.16.192.245:8080

worked finally

Sunday, November 21, 2010

Apache Mod Rewite

Apache Mod Rewrite is enabled and Rewrite Engine is on, yet rewrite is not working

Likely reason is that AllowOverride is set to None. Changing back to All will resolve the problem
If the problem persists try
RewriteLog logfile
RewiteLogLevel level; 0 - no log 9 - highest 
No log means mod_rewrite is not executing

Saturday, August 21, 2010

xmanager for linux

The title may seem stupid. But believe me that is what I have searched for. I wanted to run the applications of a far_away_computer on a local_computer as of they are applications of local_computer
The steps

  1. In the sshd_config if far_away_computer check for

    X11Forwarding yes
  2. On the local_computer edit ssh_config to have

    ForwardX11 yes
    or use the -X flag every time u connect to far_away_computer
  3. Once you are connected to far_away_computer from local_computer, start xterm on the far_away_computer.

Both ssh_config and sshd_config will be present in either /etc or /etc/ssh

Sunday, August 15, 2010

disable zend layout on home page

$this->_helper->layout()->disableLayout();

where $this represents the controller

Zend Router application.ini

if you want http://domain.com/user to be mapped to http://domain.com/index/index/username/kranthi
use this in your application.ini file
resources.router.routes.route_id.route = "/user/:username/*"
resources.router.routes.route_id.defaults.controller = "index"
resources.router.routes.route_id.defaults.action = "index"
resources.router.routes.route_id.defaults.username = "kranthi"

this code executes before transferring the control to the controller

in zend docs it is mentioned
$router = $ctrl->getRouter();
here $ctrl is an instance of Zend_Controller_Front and should be declared before running your bootstrap file in your index.php (single point of entry) file
$ctrl  = Zend_Controller_Front::getInstance();
$router = $ctrl->getRouter();
.
.
.
$application->bootstrap()
            ->run();

Monday, August 9, 2010

Datatype mismatch

Dont use the typecast blindly. Make it a practice to log datatype mismatches