This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tut.jgit; | |
import java.io.File; | |
import org.eclipse.jgit.api.CloneCommand; | |
import org.eclipse.jgit.api.Git; | |
import org.eclipse.jgit.api.errors.GitAPIException; | |
import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider; | |
public class GitTester { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REST API Concepts | |
----------------- | |
HTTP methods - GET, POST, PUT, DELETE | |
SOAP has WSDL as service definition | |
REST has no standard | |
200 - OK | |
500 - Error on the server while processing the request | |
404 - Page not found error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%-- | |
Document : manageHomePageFeeds | |
Created on : 26 Oct, 2012, 3:39:31 PM | |
Author : anand | |
--%> | |
<%@ taglib prefix="gs" uri="/struts-tags" %> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.generalsentiment.action; | |
public class RedirectToBlog { | |
private String externalUrl; | |
public String getExternalUrl() { | |
return externalUrl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// remove open jdk by looking into its rpm | |
#rpm -qa | |
# rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-52.1.9.10.40.amzn1.x86_64 | |
// install sun jdk 7 rpm - for updated java jdk checkout @ http://ivan-site.com/2012/05/download-oracle-java-jre-jdk-using-a-script/#more-39 | |
# wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" "http://download.oracle.com/otn-pub/java/jdk/7u5-b05/jdk-7u5-linux-x64.rpm" | |
# rpm -ivh jdk-7u5-linux-x64.rpm | |
//after jdk is installed successfully, install memcached. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Java Time difference using JODA | |
DateTime beforeCall = new DateTime(); | |
Map<String, Map<String, String>> info = Maps.newHashMap(); | |
Interval interval = new Interval(beforeCall, new Instant()); | |
System.out.println("new call difference = "+interval.toDurationMillis()); | |
DateTime beforeCall1 = new DateTime(); | |
allAdmins = adminDAO.getAll(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/** | |
* | |
* @author anand | |
*/ | |
public class ValidatePhoneNumber { | |
public static void main(String[] argv) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Live Environment Configuration on Elastic Beanstalk | |
Ec2-instance type - c1.medium | |
Ec2 Security Groups - elasticbeanstalk-default, default, GSUI-Base | |
Monitor Interval - 1 minute | |
Http Listener port -80 | |
Https Listen ort -443 | |
SSL Certificate ID - rn:aws:iam::228576831886:server-certificate/GeneralSentiment-SSL | |
Application Health Check URL - / | |
Health Check Interval (seconds) - 30 |