Skip to content

Instantly share code, notes, and snippets.

@Slayug
Slayug / KeyGen.java
Last active October 6, 2020 10:55
This progam demonstrate the RSA keypair generation, and get the keys as String format.
import com.jcraft.jsch.*;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
class KeyGen {
public static void main(String[] arg) {
String email = "your@email.com";
JSch jsch = new JSch();
@Slayug
Slayug / pom.xml
Created May 12, 2020 15:51
pom xml tp docker
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
@Slayug
Slayug / JUnit5Runner.java
Last active October 15, 2021 16:45
Running JUnit 5 Tests programmatically
/**
* You need the following dependencies in your classpath:
* junit-platform-console
* junit-platform-launcher
* junit-jupiter-engine
**/
import org.junit.platform.console.options.CommandLineOptions;
import org.junit.platform.console.options.Details;
import org.junit.platform.console.options.Theme;