Sunday, March 24, 2013

Android Maps Application

https://developers.google.com/maps/documentation/android/intro

Friday, March 22, 2013

Changing font size in eclipse

http://stackoverflow.com/questions/4922305/how-can-i-change-font-size-in-eclipse-for-java-text-editors

installing jadclipse for eclipse

http://5thcross.wordpress.com/2009/05/20/installing-jadclipse-in-eclipse/

Tuesday, March 19, 2013

Installing PHP Imagick extension on CentOs 6.3

yum install ImageMagick-devel
pecl install imagick
add extension=imagick.so in /etc/php.ini

Monday, March 18, 2013

Tiny Tiny RSS Reader - Unable to update through command line

I tried multiple things but I was unable to run update.php from command line.

Here is the solution.

I just copied the code required for feed updation and ran that script from command line. Here is the code :
Here is the cronjob command(if you are on hostmonster) :
wget complete_path_to update_feeds.php



update_feeds.php
#!/usr/bin/php53s
<?php
set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
                get_include_path());

define('DISABLE_SESSIONS', true);

chdir(dirname(__FILE__));

require_once "functions.php";
require_once "rssfuncs.php";
require_once "config.php";
require_once "sanity_check.php";
require_once "db.php";
require_once "db-prefs.php";

if (!defined('PHP_EXECUTABLE'))
define('PHP_EXECUTABLE', '/usr/bin/php53s');

// Create a database connection.
$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);

init_connection($link);
// Update all feeds needing a update.
update_daemon_common($link);

// Update feedbrowser
$count = update_feedbrowser_cache($link);
_debug("Feedbrowser updated, $count feeds processed.");

// Purge orphans and cleanup tags
purge_orphans($link, true);

$rc = cleanup_tags($link, 14, 50000);
_debug("Cleaned $rc cached tags.");

db_close($link);

if (file_exists(LOCK_DIRECTORY . "/$lock_filename"))
unlink(LOCK_DIRECTORY . "/$lock_filename");
?>

Sunday, March 17, 2013

Self Host Tiny Tiny RSS Reader

Steps : (Requires PHP 5.3 or above and MySql/PgSql)
If you are using HOSTMONSTER - here is how you can change your PHP version.

1. Get the tarball from http://tt-rss.org/redmine/projects/tt-rss/wiki
2. tar -xvzf <file> in your public_html/read
3. copy config.php.dist to config.php
4. Create a DB and update the info in config.php
5. source schema/ttrss_schema_mysql.sql into that DB.
6. In config.php - make SIMPLE_UPDATE_MODE true and SINGLE_USER_MODE to false.
6a. in the same file change SESSION_COOKIE_LIFETIME to 86400
7. Now login with admin/password

For those who are used to keyboard shortcuts j/k for prev/next article on Google Reader :
1. Enable the plugin googlereaderkeys in Preferences-> Plugins -> User Plugins -> googlereaderkeys


Disabling up/down arrow keys shortcuts :

1. Open include/functions.php
2. go to function get_hotkeys_map
3. comment these lines :

     "(38)|up" => "prev_article",
                                "(40)|down" => "next_article",




Blog Archive