student demonstration Montreal 2012

Read More

Limiting the upload speed in rtorrent

Limiting the upload speed in rtorrent

I have been looking for a way to limit the upload speed on rtorrent(a terminal based torrent client in linux). This is really usefully if you have bandwidth restrictions or low upload/download limits. In Xubuntu, to do that you would need to create the following file:

$vi ~/.rtorrent.rc

Once you do that you can modify the following sample config file based on your needs. I have changed it to limit the upload speed to 10KiB:

Read More

WordPress DeepFocus theme ‘readmore’ issue

WordPress DeepFocus theme ‘readmore’ issue

I have been thinking about changing my blog’s theme for quite some time. Today I finally did it. I found a really nice theme called DeepFocus and I installed it on my blog. After customizing it I realized a small problem with the read more button. The issue was that it was being displayed on every single post on the home page even if the post didn’t have more content to be displayed. If you are facing this issue you can fix it by going through the following steps.
First you would have to find the following file:

DeepFocus/includes/entry.php

the folder is located under the theme folder in your wordpress directory. Then you would have to add the following if statement around the line that displays the ‘Learn more’ button to make sure that its being displayed only if there is more content in the post.

<?php if ($pos=strpos($post->post_content, '<!--more-->')): ?>
                <a class="readmore" href="<?php the_permalink(); ?>"><span><?php _e('Learn More','DeepFocus'); ?></span></a>
<?php endif; ?>

once you do that it will chack the content of the post for the ‘

Read More

WordPress for Android

Testing WordPress for android. I just installed this tool from the android market. Its the official software released by the WordPress. It makes blogging much easier. You can set it up to work on your own domain or with any blog being hosted at WordPress.com. All you need to her started is your blog URL, your username and your password.

Read More

Thank you for the support

Thanks for all your support everyone! Unfortunately I have been really busy lately that is why I couldnt go through all of them I will start adding new posts very soon. Thanks for all your support.

Read More

Secure SQL connection – SSH Tunnel

Having a central database can be really useful for team projects, developers can develop their local code pointing directly to the same data, this way if the database is refreshed or if the schema is changed they would see the changes instantly.
One problem with a central database is having a secure connection to the clients and the server, specially when the remote database server is hosted outside the local network. To solve the security problem we can use a SSH tunnel between the clients(developer machines) and the remote database server. Another advantage of SSH tunnel is that you don’t need to allow remote access to the database which makes the database access more restricted and secure.
When this is done your local development environment will access the remote database similar to accessing a local database.

Read More

Modifying startup services in Ubuntu

Modifying startup services in Ubuntu

By default when services like Mysql or Apache are installed in Ubuntu by default they are being set to autostart when the operating system starts. If you are installing the new service on a sever then you would probably want it to start on system boot, but  you may not want to start all of the services when you start up your machine specially if you are using an old laptop.
The way that the startup services are managed in Debian based operating systems is that during the boot system searches for the start-up scripts in the /etc/rcX.d (X is the run level number). Depending on the current run level it looks for service links in /etc/rcX.d folders. Every entry in rcX.d points to another script in the /etc/init.d which is the script starting up that service.
To disable a start-up service you would have to remove the links in the /etc/rcX.d folders pointing to the /etc/init.d folder. To do this you have Two options, you can:

  1. Either do it the hard way, which is removing the links manually.
  2. Use a tool called update-rc.d that does the job automatically.
Read More