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
# see also http://kbroman.org/github_tutorial/pages/init.html | |
git init | |
# > Initialized empty Git repository in /home/eyalgo/development/eclipse-projects/file-system/.git/ | |
git remote add origin git@github.com:eyalgo/<repository>.git | |
git pull | |
# > remote: Counting objects: 7, done. | |
# > remote: Compressing objects: 100% (6/6), done. | |
# > remote: Total 7 (delta 1), reused 0 (delta 0) |
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
/opt/hbase/hbase-0.94.18/bin/start.sh | |
/opt/hbase/hbase-0.94.18/bin/stop.sh | |
/opt/hbase/hbase-0.94.18/bin/rolling-restart.sh |
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
public class DbCleanupRule implements TestRule { | |
private final DbConnectionManager connection; | |
public DbCleanupRule(DbConnectionManager connection) { | |
this.connection = connection; | |
} | |
@Override | |
public Statement apply(Statement base, Description description) { | |
return new DbCleanupStatement(base, connection); |
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
public class DbConnectionRule extends ExternalResource { | |
private DbConnectionManager connection; | |
public DbConnectionRule() { | |
} | |
@Override | |
protected void before() throws Throwable { | |
ClassPathXmlApplicationContext ctx = null; | |
try { |
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
@ContextConfiguration(locations = { "/META-INF/one-dao-TEST-ctx.xml", "/META-INF/two-TEST-ctx.xml" }) | |
public class ExampleDaoTest extends AbstractJUnit4SpringContextTests { | |
@ClassRule | |
public static DbCleanupRule connectionRule = new DbCleanupRule (); | |
@Rule | |
public DbCleanupRule dbCleanupRule = new DbCleanupRule(connectionRule.getDbConnecttion()); | |
@Autowired |
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 org.slf4j.Logger | |
import com.my.ProcessingJobResult | |
def Logger logger = jobLogger | |
//ProcessingJobResult is proprietary | |
def ProcessingJobResult result = jobResult | |
try { | |
logger.info("Deleting old webapps from CI - START") | |
def numberOfDirectoriesToKeep = 4 // Can be externalized to input parameter |
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 eyalgo; | |
import static org.hamcrest.Matchers.equalTo; | |
import static org.mockito.Matchers.anyString; | |
import static org.mockito.Matchers.argThat; | |
import static org.mockito.Mockito.inOrder; | |
import static org.mockito.Mockito.mock; | |
import static org.mockito.Mockito.never; | |
import static org.mockito.Mockito.times; | |
import static org.mockito.Mockito.verify; |
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
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<configuration> | |
<source>1.8</source> | |
<target>1.8</target> | |
</configuration> | |
</plugin> |
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
# http://docs.mongodb.org/manual/reference/mongo-shell/ | |
# under monog installation | |
mongo | |
# Print a list of all databases on the server | |
show dbs | |
show collections |
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.io.FileWriter; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
import rx.Observable; | |
import com.couchbase.client.java.AsyncBucket; |