Skip to content

Instantly share code, notes, and snippets.

View aldaris's full-sized avatar

Peter Major aldaris

  • Identity Fusion
  • Bristol, United Kingdom
  • X @majorpetya
View GitHub Profile
@aldaris
aldaris / AES-research.txt
Last active December 26, 2015 17:49
Links for AES research
http://stackoverflow.com/questions/1220751/how-to-choose-an-aes-encryption-mode-cbc-ecb-ctr-ocb-cfb
http://stackoverflow.com/questions/19626080/aes-with-password-based-secretkeyspec-vs-pbe
http://www.rfc-editor.org/rfc/rfc2898.txt section 4
http://stackoverflow.com/questions/8622367/what-are-best-practices-for-using-aes-encryption-in-android
and my pending question:
http://stackoverflow.com/questions/19626080/aes-with-password-based-secretkeyspec-vs-pbe
http://docs.oracle.com/javase/6/docs/technotes/guides/security/SunProviders.html
http://stackoverflow.com/questions/8320100/java-encryption-by-client-and-decryption-by-server-using-pbkdf2withhmacsha1-and
@aldaris
aldaris / jenkins+artifactory
Last active December 17, 2015 16:59
Jenkins+Artifactory notes
How the Jenkins build works:
To debug the start of the Maven build go for MavenModuleSetBuildExecution#doRun.
Basically during job start some of the extensions are called to create these build properties file that contains lots of information on where to deploy and what, the same set of data hence should be available when actually running the build. (becomes a temp file in tempdir), after it's set up.
ProcessCache#MavenProcess constructor is a good place to actually see the maven-agent3 starting cli command, although it should be logged in build console as well.
At somewhere very low on the stack a ProcessCache#call method will be invoked.
Basically when you do a Maven build that will kick off a new process running using the Maven3Main class from maven3-agent, and uses TCP connections to share data across the processes. On the forked process side you can look at Maven3Launcher class, where it will actually invoke the Maven3 execute method, after that you just run the build nicely from Maven itself.
Artifactor
import java.net.*;
/**
* Usage: java -Djavax.net.ssl.trustStore=/path/to/cacerts -Djavax.net.ssl.trustStorePassword=changeit HttpsCertChecker
*/
public class HttpsCertChecker {
public static void main(String[] args) throws Exception {
URL url = new URL("https://stewie.sch.bme.hu");
url.openConnection().getInputStream();
}
import org.apache.wicket.request.Request;
import org.apache.wicket.request.Url;
import org.apache.wicket.request.Url.QueryParameter;
import org.apache.wicket.request.component.IRequestablePage;
import org.apache.wicket.request.mapper.MountedMapper;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.apache.wicket.request.mapper.parameter.PageParametersEncoder;
import org.apache.wicket.util.string.Strings;
/**