Skip to content

Instantly share code, notes, and snippets.

View stillalex's full-sized avatar

Alex D stillalex

View GitHub Profile
@stillalex
stillalex / uuidTest
Created June 27, 2014 15:21
uuid generation for a new node of type file
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@stillalex
stillalex / DiffMvnTest.scala
Last active December 13, 2015 18:59
Utility class that diffs 2 maven test run logs and outputs the percentage difference in the run times on test classes that are found in both files
import scala.Option.option2Iterable
import scala.io.Source
/**
* Utility class that diffs 2 maven test run logs and outputs the percentage difference in the run times on test classes that are found in both files
*
* How to run
*
* - run first test on the reference
* mvn clean install > before.log
@stillalex
stillalex / VersionTweakTest
Created March 6, 2012 09:43
Jackrabbit Version tweaking
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@stillalex
stillalex / JSCHWrapper.java
Created February 11, 2011 17:55
Short version of classes used in a blog post - full version at https://github.com/alexparvulescu/blog/blob/master/remote-java-install
public class JSCHWrapper {
// just pass private key, user and host
public JSCHWrapper(String identityFile, String user, String host){ /* .. */ }
// executes a command
public String execCommand(String command) throws Exception { /* .. */ }
// disconnects the current ssh session
public void disconnect() { /* .. */ }