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
| // Build Netty SslContext | |
| SslContext sslContext = SslContextBuilder | |
| .forClient() | |
| // ... | |
| .build(); | |
| // Initialize ReactorClientHttpConnector with SslContext | |
| WebClient.create(new ReactorClientHttpConnector(opts -> opts.sslContext(sslContext))); |
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
| #!groovy | |
| # Best of Jenkinsfile | |
| # `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
| node { | |
| } |
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
| @PropertySource("classpath:/com/myco/app.properties") | |
| @Configuration | |
| public class ApplicationConfig { | |
| @Autowired | |
| Environment env; | |
| //... | |
| @Bean |
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
| /** | |
| * This script will automatically sync all updates from one database to another. It is meant to be run while | |
| * syncing the database using mongodump and mongorestore. | |
| * | |
| * Example: | |
| * node index.js mongodb://<user>:<pass>@dbhost.com:10645/app-production \ | |
| * mongodb://<user>:<pass>@dbhost.com:10499/local?authSource=app-production \ | |
| * app-production \ | |
| * mongodb://<user>:<pass>@newdbhost.com/app-prod | |
| */ |
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: 'Afghanistan', code: 'AF'}, | |
| {name: 'Åland Islands', code: 'AX'}, | |
| {name: 'Albania', code: 'AL'}, | |
| {name: 'Algeria', code: 'DZ'}, | |
| {name: 'American Samoa', code: 'AS'}, | |
| {name: 'AndorrA', code: 'AD'}, | |
| {name: 'Angola', code: 'AO'}, | |
| {name: 'Anguilla', code: 'AI'}, | |
| {name: 'Antarctica', code: 'AQ'}, |
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
| @Grab(group='com.github.groovy-wslite', module='groovy-wslite', version='1.1.0') | |
| @Grab(group='joda-time', module='joda-time', version='2.7') | |
| import wslite.rest.* | |
| import org.joda.time.* | |
| import org.joda.time.format.* | |
| import groovy.xml.* | |
| import groovy.json.* | |
| import static java.lang.System.* | |
| import groovy.transform.* |
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 utils | |
| import groovy.json.JsonBuilder | |
| import groovy.json.JsonSlurper | |
| class HDD { | |
| static save(Object content, String filePath) { | |
| new File(filePath).write(new JsonBuilder(content).toPrettyString()) | |
| } |
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 org.slf4j.Logger | |
| import org.slf4j.LoggerFactory | |
| import ratpack.handling.Context | |
| import ratpack.handling.Handler | |
| import ratpack.http.client.HttpClient | |
| import ratpack.http.client.StreamedResponse | |
| import ratpack.http.MutableHeaders | |
| import ratpack.http.client.RequestSpec | |
| import static ratpack.groovy.Groovy.ratpack |
NewerOlder