Jango
Vinu Varghese
Profile
Summary
Experience
- Jan 2010 - PresentTechnical Architect / Xminds Infotech Pvt Ltd
- 2010 - PresentTeam Lead / Pollenizer IndiaLeading large team @pollenizer - dealised :)
- 2010 - PresentTeam lead / Pollenizer
- Apr 2005 - PresentSenior Software engineer / Xminds Infotech Pvt Ltd
- Aug 2003 - PresentLecturer / University of Kannur
Education
-
1999 - 2001University of CalicutMSc in Computer Science
-
1996 - 1999Victoria College PalakkadBSC Maths in Maths Physics Chemistry
Updates
-
Yahoos' ceo sacked due to a fake degree?... http://t.co/sFTESAjh
-
Facebook action links - Now you can have a 'Hate' link right next to the story published from your app... http://t.co/phgTRQHM
-
Currently I am working on ROR, with activeadmin http://t.co/EjrzsqXN That's just excellent admin interface... http://t.co/CWHbar2j
-
Need a mailserver to debug your apps mails? http://t.co/5mgikxzR This is just perfect - no accidental test mails... http://t.co/rg061eQR
-
How to reverse engineer .mo file - php + Zend way http://t.co/fGoHB3Iy http://t.co/e8ciMwR2
-
Working on creating something insane :)
-
Any one using http://t.co/0E0JRMpQ ?
-
Nginx http://t.co/BPT5NGAA
-
Java still leads: http://t.co/FamxbIuS http://t.co/M2mvCI2X
-
Should I buy tissot or casio?. Come over and share your opinion on http://t.co/9xe2iIzl
-
Monitor 2 servers for free :) http://t.co/Y3JDwBBV
-
Google provides activity report... http://t.co/7tTINVb9
-
Hardtimes for blackberry?... http://t.co/JADttk6i
-
A cool orm tool for PHP http://t.co/HfHLFhNh http://t.co/rcZUctyh
-
Last week AWS suffered some outages - how to keep your app stand on such outages :... http://t.co/FtOPdlIv
-
FB opens up new Page Apis http://t.co/D1MHGg3c
-
Encyclopedia Britannica Stops Printing http://t.co/vXfvdCJ9
-
Twitter is giving awesomeness back to the open source :) http://t.co/2sHyjhRx http://t.co/AdoG7ZXD
-
Amazon Adds SSH Client to AWS Console http://t.co/OZ6TMgeo
-
Js based presentation: http://t.co/48oCYI20 Make sure you are a bit creative on the css side ;)
Posts
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
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
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
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 < 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 < 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);
}
}
}
/**
* 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
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:
- Follow Mashable Tech & Gadgets on Twitter
- Become a Fan on Facebook
- Subscribe to the Tech & Gadgets channel
- Download our free apps for Android, Mac, iPhone and iPad
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.
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.
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.
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.
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:
- Follow Mashable Apple on Twitter
- Become a Fan on Facebook
- Subscribe to the Apple channel
- Download our free apps for iPhone and iPad