Skip to content

Instantly share code, notes, and snippets.

View maniksurtani's full-sized avatar

Manik Surtani maniksurtani

View GitHub Profile
#!/bin/bash
#Synchronize all changes (incl new branches and tags) from repo A to repo B, where B is a bare repo.
#B must be an bare clone of A (initial setup)
#A' must be a clone of A where origin points to A
#There are probably more optimized ways to do this. the advantage of this method is that no branch is deleted from the backup repo
#so the source repo is not 100% trusted
#make sure to define BACKUP_REPO and INTERMEDIARY_REPO
#define where repo B resides (Git repo URL) eg file://${HOME}/path/to/repo.git
@maniksurtani
maniksurtani / gitsyncupstream.sh
Created November 8, 2010 12:59
A utility script that syncs a local clone of a personal fork with a remote upstream repo. This script assumes that all the branches that exist on your personal fork also exist on the upstream repo. The script pulls down changes from upstream into your l
#!/bin/bash
####################################################################################
#
# This script syncs your private, personal checkout with an upstream repository.
#
###################################################################################
# This is where your local, priave copy is checked out
LOCAL_REPO=${HOME}/Code/infinispan/my_repo
@maniksurtani
maniksurtani / sync_with_upstream.sh
Created November 10, 2010 18:02
Updates a local clone of your personal fork of an upstream project to the latest code in the upstream repository.
#!/bin/bash
# Can be a full repo URL or a short name if you have added it as a remote
UPSTREAM="upstream"
ORIGIN="origin"
LOCAL_CLONE_OF_FORK="$HOME/Code/infinispan/my_repo"
BRANCHES_TO_SYNC="master 4.2.x"
cd $LOCAL_CLONE_OF_FORK
git fetch -q $UPSTREAM
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running net.beaumaris.cachetest.ComplexKeyRehashTest
-------------------------------------------------------------------
GMS: address=CacheA-56062, cluster=test-cluster, physical address=10.36.6.212:57726
-------------------------------------------------------------------
-------------------------------------------------------------------
package org.infinispan.distribution;
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
import org.infinispan.distribution.rehash.RehashTestBase;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
@maniksurtani
maniksurtani / gist:1162152
Created August 22, 2011 11:09
diff to standalone.xml
Index: dist-dir/src/main/resources/standalone/configuration/standalone.xml
===================================================================
--- dist-dir/src/main/resources/standalone/configuration/standalone.xml (revision 82)
+++ dist-dir/src/main/resources/standalone/configuration/standalone.xml (working copy)
@@ -210,6 +210,28 @@
enabled="true"
timeout="600000" />
</distributed-cache>
+
+ <distributed-cache
Place 1:
Queen: Aslak+Wife
Queen: Lincoln III
Twin, Cot1, Cot2 - To be decided by Dan, ALR, (open slot...Wesley Hayles?)
Place 2:
Queen: Emmanuel
Queen: Manik
...
import javax.ejb.Stateless;
import javax.inject.Inject;
@Stateless
class FooEJB {
@Inject
Cache<String, String> defaultCache;
@Inject
...
import org.infinispan.cdi.ConfigureCache;
import javax.enterprise.inject.Produces;
class Config {
@ConfigureCache("my-cache-name")
@MyCacheQualifier
@Produces
Configuration myCacheConfiguration() {
return new Configuration()
class Config {
@ConfigureCache("my-cache-name")
@MyCacheQualifier
@Produces
Configuration myCacheConfiguration;
}