Skip to content

Instantly share code, notes, and snippets.

View rocketraman's full-sized avatar

Raman Gupta rocketraman

View GitHub Profile
package com.vivosys.cluster.hazelcast;
import com.vivosys.cluster.api.Cluster;
import com.vivosys.cluster.api.ClusterException;
import com.google.common.collect.ImmutableList;
import com.hazelcast.core.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Iterator;
@rocketraman
rocketraman / hipchat.log
Created March 20, 2012 19:31
HipChat jenkins plugin debug logs
Mar 20, 2012 3:20:30 PM org.apache.commons.httpclient.HttpConnection releaseConnection
FINE: Releasing connection back to connection manager.
Mar 20, 2012 3:20:30 PM org.apache.commons.httpclient.HttpConnection releaseConnection
FINEST: enter HttpConnection.releaseConnection()
Mar 20, 2012 3:20:30 PM org.apache.commons.httpclient.HttpConnection isResponseAvailable
FINEST: enter HttpConnection.isResponseAvailable()
Mar 20, 2012 3:20:30 PM org.apache.commons.httpclient.HttpMethodBase shouldCloseConnection
FINE: Should NOT close connection in response to directive: keep-alive
Mar 20, 2012 3:20:30 PM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge
FINE: Authentication challenge(s) not found
@rocketraman
rocketraman / prompt.sh
Created December 21, 2011 00:53
UNIX Prompt setup with user@host, working directory, and git branch, git dirty, and git stash
function parse_git_dirty {
git symbolic-ref HEAD > /dev/null 2>&1 || return
git status 2> /dev/null | grep -q "nothing to commit" || echo "[d]"
}
function parse_git_stash {
git symbolic-ref HEAD > /dev/null 2>&1 || return
[[ $(git stash list 2> /dev/null | tail -n1) != "" ]] && echo "[s]"
}
@rocketraman
rocketraman / settings.xml
Created December 20, 2011 19:59
Maven settings file for VIVO repository artifact download
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<username>username</username>
<password>password</password>
<id>vivosys-repo</id>
</server>
</servers>
@rocketraman
rocketraman / pom
Created December 20, 2011 00:58
datanucleus enhancer maven build plugin example
<!-- Need to use 1.6 target, datanucleus enhancer does not support 1.7 (http://www.jpox.org/servlet/jira/browse/NUCMAVEN-26) -->
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
@rocketraman
rocketraman / settings.xml
Created November 28, 2011 06:51
Maven settings file for VIVO repository artifact upload
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<username>username</username>
<password>password</password>
<id>vivosys-release</id>
</server>
<server>
@rocketraman
rocketraman / equals-hash-tostring.java
Last active April 27, 2023 04:53
Example of Guava-based equals, hashCode, toString implementations
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
public class Address {
...
@Override
public boolean equals(Object obj) {