Jango

Vinu Varghese

Profile

Technology Architect at Xminds Infotech Pvt Ltd
Computer Software | Thiruvananthapuram Area, India, IN

Summary

Application developer, db administrator, system administrator project leader on variety of projects spanning from online money transfers to chat applications. Interested in client/server design , particularly with new language.
Specialties: Java, j2ee, Python, Django - all includes server (web and application) / system administration

Experience

  • Jan 2010 - Present
    Technical Architect / Xminds Infotech Pvt Ltd
  • 2010 - Present
    Team Lead / Pollenizer India
    Leading large team @pollenizer - dealised :)
  • 2010 - Present
    Team lead / Pollenizer
  • Apr 2005 - Present
    Senior Software engineer / Xminds Infotech Pvt Ltd
  • Aug 2003 - Present
    Lecturer / University of Kannur

Education

  • 1999 - 2001
    University of Calicut
    MSc in Computer Science
  • 1996 - 1999
    Victoria College Palakkad
    BSC Maths in Maths Physics Chemistry

Additional Information

Websites:

Posts

December 17, 12:01 PM

see it here:

http://code.google.com/p/memcached-session-manager/


December 17, 11:42 AM

Now a days it is obvious that most web rely on thirdparty authentication – and use oauth for that – twitter uses that: and here is where you add your application : http://twitter.com/oauth_clients/new


December 17, 07:30 AM

Often developers especially whom with python (Django) , ruby (on rails), php, find difficult to get their caching subsystem – memcached [http://memcached.org]- run on windows. Though there hasn’t much work to port memcached to windows it is easy to get it working using colinux [http://www.colinux.org/]

Steps to do

1. Install colinux

2. Download the fedora image – I did with it

3. Enabled networking between the host os and guest os (between windows and linux) see it here [http://colinux.wikia.com/wiki/Network]

4. Download latest memcached to linux – install it – Remember you should have libevent installed prior to it

5. Using any of the apis access the memcached running on the linux from windows – I checked with python api

Update: You can get memcached on windows here : http://labs.northscale.com/memcached-packages/

Happy programming in windows


October 06, 08:16 AM

download the latest from http://www.python.org/download/

Unzip it, change to that directory and run ./configure –prefix=< Your custom python install path>

then make,make install

You have new version of python at <Your custom python install path>/bin (ie <Your custom python install path>/bin/python will be the new python) . without disturbing the existing version


August 13, 10:00 PM

Create a server key: openssl genrsa -des3 -out server.key.pass 1024

Remove the pass: openssl rsa -in server.key.pass -out server.key

Generate CSR: openssl req -new -key server.key -out server.csr


June 06, 08:11 AM


April 27, 03:16 AM

This filter is based on YUI Compressor. So for performance you must use any caching filter. The code is


package com.vinu.web.performance;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StringReader;
import java.io.StringWriter;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;

import org.mozilla.javascript.ErrorReporter;
import org.mozilla.javascript.EvaluatorException;

import com.yahoo.platform.yui.compressor.CssCompressor;
import com.yahoo.platform.yui.compressor.JavaScriptCompressor;

/**
* @author Vinu Varghese (Email: vinu@x-minds.org) Minifies JS and CSS on the fly, based on the YUI Compressor The minification is a heavy process so use this
*         filter along with a caching filter for performance.
*/
public class JsCssMinifyFilter implements Filter
{

private FilterConfig config;

/*
* (non-Javadoc)
*
* @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
*/
public void init(FilterConfig filterConfig) throws ServletException
{
this.config = filterConfig;
}

/*
* (non-Javadoc)
*
* @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
*/
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
{
HttpServletRequest originalRequest = (HttpServletRequest) request;

HttpServletResponse originalResponse = (HttpServletResponse) response;

// Create the response wrapper
MinifiedResponse minifiedResponse = new MinifiedResponse(originalResponse);

// Continue the chain - get the contents
chain.doFilter(originalRequest, minifiedResponse);

// The data
String data = new String(minifiedResponse.getData());

// Create the reader
StringReader reader = new StringReader(data);
//Create the writer
StringWriter writer = new StringWriter();

String requestURI = originalRequest.getRequestURI();

try
{
//Do JS minification
if (requestURI.endsWith(".js"))
{
minifyJS(reader, writer);
}
// Do Css minification
else if (requestURI.endsWith(".css"))
{
minifyCSS(reader, writer);
}
//Else - we can't do any other minification ;)
else
{
writer.write(data);

}

}
catch (Exception ex)
{
// We do a generic exception handling

//Log error
config.getServletContext().log("Error in minifying : " + requestURI, ex);
// Write the data as it is
writer.write(data);
}

//Write the data to the original response

// Get the data from the writer (Compressed data)
String compressed = writer.toString();

//Set the content length correctly
originalResponse.setContentLength(compressed.length());

//Write the data
originalResponse.getOutputStream().write(compressed.getBytes());

}

/**
* @param reader
* @param writer
* @throws IOException
*/
private void minifyCSS(StringReader reader, StringWriter writer) throws IOException
{
CssCompressor cssCompressor = new CssCompressor(reader);
cssCompressor.compress(writer, -1);
}

/**
* @param reader
* @param writer
*/
private void minifyJS(StringReader reader, StringWriter writer) throws IOException
{
JavaScriptCompressor compressor = new JavaScriptCompressor(reader, new ErrorReporter() {

public void warning(String message, String sourceName, int line, String lineSource, int lineOffset)
{
if (line &lt; 0)
{
System.err.println("\n[WARNING] " + message);
}
else
{
System.err.println("\n[WARNING] " + line + ':' + lineOffset + ':' + message);
}
}

public void error(String message, String sourceName, int line, String lineSource, int lineOffset)
{
if (line &lt; 0)
{
System.err.println("\n[ERROR] " + message);
}
else
{
System.err.println("\n[ERROR] " + line + ':' + lineOffset + ':' + message);
}
}

public EvaluatorException runtimeError(String message, String sourceName, int line, String lineSource, int lineOffset)
{
error(message, sourceName, line, lineSource, lineOffset);
return new EvaluatorException(message);
}
});

// Does the compression
compressor.compress(writer, -1, true, false, true, false);

}

/*
* (non-Javadoc)
*
* @see javax.servlet.Filter#destroy()
*/
public void destroy()
{

}

/**
* A response wrapper, the content is saved to the output buffer, the stream returned is ServletOutputStreamWrapper
*
* @author Vinu Varghese (Email: vinu@x-minds.org)
*
*/
class MinifiedResponse extends HttpServletResponseWrapper
{

private ByteArrayOutputStream output = new ByteArrayOutputStream();

/**
* @param response
*/
public MinifiedResponse(HttpServletResponse response)
{
super(response);
}

/*
* (non-Javadoc)
*
* @see javax.servlet.ServletResponseWrapper#getOutputStream()
*/
@Override
public ServletOutputStream getOutputStream() throws IOException
{
return new ServletOutputStreamWrapper(this.output);
}

/*
* (non-Javadoc)
*
* @see javax.servlet.ServletResponseWrapper#getWriter()
*/
@Override
public PrintWriter getWriter() throws IOException
{
PrintWriter localPrintWriter;
try
{
localPrintWriter = new PrintWriter(new OutputStreamWriter(getOutputStream(), "UTF-8"), true);
}
catch (Exception localException)
{
localPrintWriter = new PrintWriter(getOutputStream(), true);
}

return localPrintWriter;
}

/**
* Returns the data
*
* @return
*/
public byte[] getData()
{
try
{
output.flush();
}
catch (IOException e)
{
//ignore
}

return output.toByteArray();
}

}

/**
* Output stream wrapper I have overriden the write method, is that enough?
*
* @author Vinu Varghese (Email: vinu@x-minds.org)
*
*/
class ServletOutputStreamWrapper extends ServletOutputStream
{

private ByteArrayOutputStream output;

/**
*
*/
public ServletOutputStreamWrapper(ByteArrayOutputStream output)
{
this.output = output;
}

/*
* (non-Javadoc)
*
* @see java.io.OutputStream#write(int)
*/
public void write(int b) throws IOException
{
output.write(b);
}

}

}

August 13, 03:44 AM

See this link: http://www.agentbob.info/agentbob/79-AB.html


July 29, 12:53 AM

Check this: http://java.decompiler.free.fr

A free java decompiler


July 22, 05:13 AM


/**
* A simple tar reader
* Just reads through tar file, parses the headers and writes file.
*/
package com.jango.tarreader;

import java.io.IOException;
import java.io.InputStream;

/**
* @author vinu
*
*/
public abstract class AbstractTarReader {

public void read(InputStream in) throws IOException {

while (true) {

Header head = parseHeader(in);

if (head == null)
break;

if (head.isFile && head.filesize > 0) {
int remainder = head.filesize % 512;
int skiplen = 0;
if (remainder != 0)
skiplen = 512 – remainder;

byte[] fileContents = new byte[head.filesize];

in.read(fileContents);
in.skip(skiplen);

createFile(head.filename, fileContents);

} else if (!head.isFile) {
createDir(head.filename);
}

}
}

/**
* Creates the file – dependent on implementation
*
* @param filename
* @param fileContents
* @throws IOException
*/
public abstract void createFile(String filename, byte[] fileContents)
throws IOException;

/**
* Creates the directory as in the tar
*
* @param dirname
*/
public abstract void createDir(String dirname);

// Parses the header
private Header parseHeader(InputStream in) throws IOException {

Header head = new Header();

byte buf[] = new byte[512];

int len = in.read(buf);

// EOF or not fully read
if (len == -1 || len != 512)
return null;

StringBuffer sBufFilename = new StringBuffer();

byte linkIndicator = buf[156];

for (int i = 0; i < 100; i++) {
if (buf[i] != 0) {
sBufFilename.append((char) buf[i]);
}
}

StringBuffer sBufFilesize = new StringBuffer();
for (int i = 124; i < 136; i++) {
sBufFilesize.append((char) buf[i]);
}

head.filename = sBufFilename.toString();
head.filesize = Integer.parseInt(“0″ + sBufFilesize.toString().trim(),8);

if(head.filesize==0 && head.filename.length()==0)
return null;

if ((char) linkIndicator == ’5′) {
head.isFile = false;
}

return head;
}

// To store the header info – Simple for now
// Only the filename
class Header {
String filename;
int filesize;
boolean isFile = true;
}

}


Posts

July 19, 07:30 PM
You can come up with a thousand reasons why you shouldn't do something, but it can be far more difficult to find one good motivational reason to move your forward. Getting past this problem may be as simple as reframing your excuses to help eliminate them altogether. More »


July 17, 11:12 PM
I liked a YouTube video: asal
July 09, 12:21 AM


A common problem with video chatting using tablets is shaky video. Now Google has selected SRI International to embed its video stabilization software inside the Google Talk app in Android 3.0 devices, promising to smooth out those jittery video transmissions from front-facing cameras on Android smartphones and tablets.

The Menlo Park-based nonprofit SRI International, formerly associated with Stanford University and responsible for the invention of the computer mouse in 1964, has been working on this stabilization software since the early 1990s. Now, Android tablets are fast enough to allow the software to perform its magic in real time.

The software works by identifying the user’s face, stabilizing that video before it’s compressed for transmission. There’s an added benefit to that steady shot — the video is easier to compress because there’s less movement involved, making the picture look sharper with less video noise.

So far, this video stabilization is only available for Google Talk with Android 3.0 installed. There are stabilization apps for the iPhone and iPad (such as SteadyCam Pro, which we favorably reviewed), but they don’t yet work in real time, a necessity for live chatting.

[via Ubergizmo]

Graphic courtesy SRI International

More About: android 3.0, chat, Google, google talk, software, SRI, trending, Video Stabilization

For more Tech & Gadgets coverage:

May 18, 06:41 PM
I uploaded a YouTube video: One man killed by this reckless driving of the bus driver on May 18, 2011. Accident was caught on the Kerala Police surveillance camera.
May 18, 06:40 PM
I uploaded a YouTube video: One man killed by this reckless driving of the bus driver on May 18, 2011. Accident was caught on the Kerala Police surveillance camera.
April 27, 07:28 AM
I uploaded a YouTube video:
April 10, 11:27 PM
I liked a YouTube video: Knowingly or unknowingly if you are ignoring your parents, please see this video. You will recognize them as "Real Gods and Goddesses".
March 02, 06:30 AM
I liked a YouTube video: Tips on mobile application development
March 02, 06:29 AM
I liked a YouTube video: Tips on mobile application development
January 23, 11:12 PM

You credit card number may look like a random string of 16 digits that’s unique in the world but those digits reveal a little more than you think.

For instance, the first digit of the card represents the category of industry which issued your credit card. American Express is in the travel category and cards issued by them have 3 as the first digit. If you have VISA or MasterCard, your card’s first digit should be either 4 or 5 as they are from the banking and financial industry.

The first six digits of your credit card number identify the institution that issued the card to you. VISA cards follow the series 4xx while MasterCard uses 51-55 as the prefix.

You may even verify if a given credit card number is valid or not using simple addition. The following visual illustration courtesy Mint.com will help you understand more about the anatomy of your credit card.

     

This article, titled Making Sense of your Credit Card Number, was originally published at Digital Inspiration under Credit Card, Infographics, Offbeat.

January 15, 09:00 PM
I just found out that it costs more than a penny to manufacture a penny. Specifically, it costs 1.62 cents to produce that 1 cent copper coin. And that's been the case for a while now! What the hell? More »


December 31, 10:36 PM
I liked a YouTube video:
December 23, 12:03 AM
I liked a YouTube video:
December 16, 02:01 PM

Google has just released a nifty new feature that allows you to send family and friends themed holiday greeting cards via email that include maps of a particular destination, a Street View picture or a Places marker (i.e. the Eiffel Tower).

First you choose from a holiday cover, add a recipient and personal message, and you can then include directions to a location (similar to the way you would input directions on Google Maps). You can also choose from adding a Street View Image or favorite Place.

While the feature seems to be geared towards holiday greetings for now, it seems that it would make sense to launch a broader implementation of the Maps-focused email cards year round. Users could send cards with images of areas where they have visited or send an invitation with a particular address.


December 02, 06:38 PM
I liked a YouTube video:
December 02, 03:24 PM
I liked a YouTube video:
October 14, 09:01 AM

Skype is about to become much more social with the launch of Skype 5.0. Today, the company announced that the new version of Skype 5.0 for Windows will include a deep Facebook integration, which was initially reported by All Things Digital a few weeks ago.

After logging in via Facebook Connect, you’ll be able to see your Facebook News Feed with the Skype interface, post status updates that can be synced with your Skype mood message and comment and like friends’ updates and wall posts.

In terms of actual integration with the VoIP end of things, you can now call and SMS your Facebook friends on their mobile phones and landlines from Skype. You can also make a make a free Skype-to-Skype call if your Facebook friend is also a Skype contact.

Video calling is on the rise (video calling on Skype accounted for approximately 40% of all Skype-to-Skype minutes in the first half of this year), so Skype is giving users a free trial of group video calling.

The new version of Skype also features automatic call recovery, which helps you immediately reconnect calls that are interrupted due to Internet connection problems. Lastly, Skype will include an improved UI and a new home dashboard which features a feed of mood messages from your contacts, and tutorials on Skype features and more.

Clearly the big news here is the Facebook integration, which is a big win for Skype when it comes to adding a social component to its product. It could help Skype, which is filing for an IPO, expand its userbase (Skype currently has 560 million registered users), and it make the VoIP product more relevant in Facebook users day-to-day interactions. It should be interesting to see where the two companies take this partnership and if the integration extends to Skype’s mobile apps. Of course, Facebook could just buy Skype.


October 06, 10:32 PM
I liked a YouTube video: Our biggest investment to date!
September 17, 08:37 AM

Trivia: Google cafeterias are known to serve lavish foods and, no wonder, people tend to gain as much as 20 pounds within months of joining Google. They call it the Google 20 effect.

Google India has added an “External Referral Program” where outsiders, or people who aren’t employees of Google, also get an opportunity to refer candidates for some of the open positions that are available across Google offices in India.

If your referred candidate is hired by Google, they’ll send you a cheque for 100,000.

The program works something like this – if you have a friend or a colleague who might be looking for a change, you can submit some of their basic details (like educational qualification, current employer, etc.) to Google through this online form.

Your job is done and Google’s in-house recruitment team will take it from there.

You can make multiple recommendations and they’ll award you with 100,000 for each one of the successful referrals who gets through the selection process and joins Google.

Google’s External Referral Program is valid only for Software Engineering related positions currently available in their Bangalore and Hyderabad offices.

The last data for sending referrals is October 15th 2010. Thanks Peeyush and Gaurav.

Also see: Getting Your Resume Noticed at Google

     

This article, titled Become a Headhunter for Google India, was originally published at Digital Inspiration under Google, Jobs, India.

September 09, 06:22 AM


A hacker called pod2g claims he’s found an exploit that will allow a jailbreak of iOS 4.1, and other hackers from the jailbreaking community have confirmed it.

Jailbreaking (overriding Apple’s software lock-down on iOS devices) is usually a cat-and-mouse game: hackers find a new exploit, and then Apple patches it with the next iOS update.

This time, however, things might be different, as this new jailbreak is based on a boot ROM exploit, meaning it targets a low-level part of the OS. Apple will have to update the hardware — not the software — to patch it.

Furthermore, it means that most iOS devices, regardless of the iOS version they have installed, may be vulnerable to the exploit: iPhone 4, iPhone 3GS, the iPad, and so on.

Although the U.S. government recently declared jailbreaking legal, it still voids your warranty, so do it at your own peril. If you do plan to jailbreak your iOS device, you should probably wait before you upgrade it to 4.1, as the jailbreak is still not public; meaning there’s not an easy way for the layman to apply it. Judging from the buzz in the jailbreaking community, which is still testing and fine-tuning the hack, it might be the real thing.

More About: apple, hack, hacker, hackers, ios 4.1, ipad, iphone, iPod Touch, jailbreak

For more Apple coverage:

abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz