This file contains hidden or 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.File; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.security.KeyStore; | |
import java.security.KeyStoreException; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.Security; |
This file contains hidden or 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 SpringBootUndertowHTTP2 { | |
@Bean | |
UndertowEmbeddedServletContainerFactory embeddedServletContainerFactory() { | |
UndertowEmbeddedServletContainerFactory factory = new UndertowEmbeddedServletContainerFactory(); | |
factory.addBuilderCustomizers( | |
builder -> builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true)); | |
return factory; | |
} | |
} |
This file contains hidden or 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 li.barlog; | |
import jdk.management.resource.ResourceContext; | |
import jdk.management.resource.ResourceContextFactory; | |
import jdk.management.resource.ResourceType; | |
import jdk.management.resource.SimpleMeter; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.io.IOException; |
This file contains hidden or 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
--- | |
- name: Provision | |
hosts: all | |
sudo: yes | |
tasks: | |
- name: Upgrade | |
apt: upgrade=dist | |
- name: Locale install | |
apt: name=language-pack-ru state=latest update_cache=yes cache_valid_time=3600 |
This file contains hidden or 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.IOException; | |
/** | |
* Simple console progress bar | |
* | |
* Usage: | |
* | |
* final int MAX = new Random().nextInt(256); | |
* System.out.println("MAX: " + MAX); | |
* ConsoleProgressBar progressBar = new ConsoleProgressBar(MAX); |
This file contains hidden or 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.IOException; | |
/** | |
* Simple console unlimited progress bar | |
* | |
* Usage: | |
* | |
* ConsoleUnlimitedProgressBar progressBar = new ConsoleUnlimitedProgressBar(); | |
* int counter = 0; | |
* while (true) { |
This file contains hidden or 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
{ | |
"name": "teamcity-build-starter", | |
"version": "0.0.1", | |
"private": true, | |
"dependencies": { | |
"node-fetch": "latest" | |
} | |
} |
This file contains hidden or 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
# JDK 7 | |
-Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true | |
-Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dump=true | |
-Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dumpTreshold=999999 | |
# JDK 8 | |
-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true | |
-Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true | |
-Dcom.sun.xml.ws.transport.http.HttpAdapter.dumpTreshold=999999 |
This file contains hidden or 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
task docker(dependsOn: tasks.bootJar) { | |
def tag = 'app' | |
def workDir = file("$buildDir/docker") | |
def dockerFile = file('src/main/docker/Dockerfile') | |
def inputDir = file("$buildDir/libs") | |
doLast { | |
copy { | |
from inputDir | |
from dockerFile |
This file contains hidden or 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 bot.config.ITConfig | |
import org.junit.jupiter.api.extension.ExtendWith | |
import org.springframework.boot.test.context.SpringBootTest | |
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment | |
import org.springframework.test.context.ActiveProfiles | |
import org.springframework.test.context.junit.jupiter.SpringExtension | |
import org.springframework.boot.test.util.TestPropertyValues | |
import org.springframework.context.ConfigurableApplicationContext | |
import org.springframework.context.ApplicationContextInitializer | |
import org.springframework.context.ApplicationListener |