Wednesday, March 27, 2013

AWS Auto Scaling through UI

Only Third party tools exist : 

AWS Auto Scaling - Invalid Image Id Problem

If you get an error like : Invalid Image Id while creating a launch configuration : 
One possible reason is : 

1. That your AMI exists in a different region that the one you are creating your config for.

AWS Auto Scaling CLI

1. Step by Step Guide :
3. Summary of Config : 
In your .bash_profile (on CentOs 6.3), put the correct values for the following : 

export AWS_AUTO_SCALING_HOME=/mnt/aws/AutoScaling-
export JAVA_HOME=/usr/
export AWS_CREDENTIAL_FILE=/mnt/aws/myCredentialFile

4. Format of the credentials File(/mnt/aws/myCredentialFile) :


4a. Get your credentials from :

5. List of Other regions :

Monday, March 25, 2013


instantiating an object of an interface on the fly through anonymous classes : 
  IBlah blah = new IBlah() {      public void doBlah() {          System.out.println("Doing Blah");      }  };

Tuesday, March 19, 2013

Installing PHP Imagick extension on CentOs 6.3

yum install ImageMagick-devel
pecl install imagick
add 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

set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .

define('DISABLE_SESSIONS', true);


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);

// Update all feeds needing a update.

// 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.");


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
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