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 static void main(String[] args) throws Exception { | |
String[] config = MiniKdcConfigBuilder.builder() | |
.workDir(prepareWorkDir()) | |
.confDir("minikdc-krb5.conf") | |
.keytabName("example.keytab") | |
.principals("client/localhost", "HTTP/localhost") | |
.build(); | |
MiniKdc.main(config); |
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
@Configuration | |
class KerberosConfig { | |
@Value("${app.user-principal}") | |
private String principal; | |
@Value("${app.keytab-location}") | |
private String keytabLocation; | |
@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
@Service | |
class SampleClient { | |
@Value("${app.access-url}") | |
private String endpoint; | |
private RestTemplate restTemplate; | |
public SampleClient(RestTemplate restTemplate) { | |
this.restTemplate = restTemplate; |
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
@Configuration | |
@EnableWebSecurity | |
class WebSecurityConfig extends WebSecurityConfigurerAdapter { | |
@Value("${app.service-principal}") | |
private String servicePrincipal; | |
@Value("${app.keytab-location}") | |
private String keytabLocation; |
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
<suite name="Suite"configfailurepolicy="continue"parallel="true"thread- | |
count="3"> | |
<test name="MockTest"> | |
<groups> | |
<define name="Page"> | |
<include name="bind" /> | |
<include name="link" /> | |
</define> | |
<run> | |
<include name="Page"> |
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 TestNGParallelRunner{ | |
public static void main(String[] args){ | |
if(PARALLEL_ENABLE){ | |
SeleniumGridManager seleniumGridManager = new SeleniumGridManager(); | |
seleniumGridManager.startSeleniumGrid(); | |
try{ | |
List<String>testGroup=new TestNGXmlParser().getTestGroupsFromTestNGXml(TEST_SUITE); | |
ExecutorService executoService = Executor.newFixedThreadPool(THREAD_COUNT); | |
for(String testGroup : testGroups){ | |
TestThread testThread = new TestThread(testGroup); |
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 TestThread impements Runnable{ | |
public TestThread(String testGroupNam){ | |
this.testGroupName=testGroupNam; | |
} | |
private String testGroupName; | |
@Override | |
public void run(){ | |
TestNG testSuite = new TestNG(true); | |
TestBase c = constructGroup(testGroupName); | |
testSuite.setTestGroups(new Group[] {c.getGroup()}); |
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
$(function () { | |
var mediumPromise = new Promise(function (resolve) { | |
var $content = $('#jsonContent'); | |
var data = { | |
rss: 'https://medium.com/feed/@sabesan96' | |
}; | |
$.get(' https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fmedium.com%2Ffeed%2F%40sabesan96', data, function (response) { | |
if (response.status == 'ok') { | |
$("#logo").append(`<img src="${response.feed["image"]}" class="rounded mx-auto d-block">`) | |
var display = ''; |
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
<body> | |
<div class="container mt-5 pt-5" id="medium"> | |
<div class="jumbotron text-center"> | |
<div id="logo"></div> | |
<h1 class="display-4 mb-3">@username's Posts</h1> | |
<a class="btn btn-outline-primary btn-lg" href="https://medium.com/@username" target="_blank" role="button">View all posts</a> | |
</div> | |
<div class="row" id="jsonContent"> | |
</div> | |
</div> |
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 | Size(gzip) | Tree-shaking | Popularity(stars) | Methods richness | Pattern | Timezone Support | Locale | |
---|---|---|---|---|---|---|---|---|
Moment.js | 329K(69.6K) | No | 42.1k | High | OO | Good(moment-timezone) | 123 | |
dayjs | 6.5k(2.6k) without plugins | No | 23k | High | OO | Not yet | 130 |
OlderNewer