This file contains 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 ParsedUrl(url) { | |
var parser = document.createElement("a"); | |
parser.href = url; | |
// IE 8 and 9 dont load the attributes "protocol" and "host" in case the source URL | |
// is just a pathname, that is, "/example" and not "http://domain.com/example". | |
parser.href = parser.href; | |
// IE 7 and 6 wont load "protocol" and "host" even with the above workaround, | |
// so we take the protocol/host from window.location and place them manually |
This file contains 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
version: '2' | |
services: | |
zookeeper: | |
image: 'docker.io/bitnami/zookeeper:3-debian-10' | |
ports: | |
- '2181:2181' | |
environment: | |
- ALLOW_ANONYMOUS_LOGIN=yes | |
kafka: |
This file contains 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.lang.annotation.*; | |
public class DDD { | |
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface ApplicationService { } | |
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface DomainService { } | |
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface AggregateRootEntity { } | |
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface NonAggregateRootEntity { } | |
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface ValueObject { } | |
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface Repository { } | |
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface Factory { } |
This file contains 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
const formatter = function (options) { | |
const cucumber = require(options.cucumberLibPath); | |
const common = require('./cucumberjs_formatter_common.js'); | |
//Need to create an instance to see the summary in the console output | |
const formatter = new cucumber.Formatter(options); | |
const summaryFormatter = new cucumber.SummaryFormatter(options); | |
let currentFeature = ''; | |
let featureIndex = 0; | |
/** | |
* test-run == Feature == testSuite |
This file contains 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
// NOTE: This is not a by-the-book implementation of the UnitOfWork pattern. If you don't feel it is | |
// OK, then you can call this class Transaction or anything like that | |
public class UnitOfWork { | |
// static reference to entityManagerFactory | |
public static UnitOfWork createUnitOfWork() { | |
EntityManager entityManager = entityManagerFactory.createEntityManager(); | |
return new UnitOfWork(entityManager); | |
} | |
This file contains 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
FirefoxProfile fxProfile = new FirefoxProfile(); | |
fxProfile.setPreference("browser.download.folderList",2); | |
fxProfile.setPreference("browser.download.manager.showWhenStarting",false); | |
fxProfile.setPreference("browser.download.dir","c:\\mydownloads"); | |
fxProfile.setPreference("browser.helperApps.neverAsk.saveToDisk","text/csv"); | |
WebDriver driver = new FirefoxDriver(fxProfile); | |
driver.navigate().to("http://www.foo.com/bah.csv"); |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>5051</title> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.js"></script> | |
</head> | |
<body> | |
<h1>5051</h1> |
This file contains 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 com.fasterxml.jackson.annotation.JsonUnwrapped; | |
import org.springframework.expression.spel.standard.SpelExpressionParser; | |
import java.util.HashMap; | |
import java.util.Map; | |
@SuppressWarnings({"unused", "FieldCanBeLocal"}) | |
public class LinkedResource<T> { |
This file contains 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
#!/bin/bash | |
set -eu | |
SENTRY_DOWNLOAD_Linux_i686="https://downloads.sentry-cdn.com/sentry-cli/1.46.0/sentry-cli-Linux-i686" | |
SENTRY_DOWNLOAD_Windows_x86_64="https://downloads.sentry-cdn.com/sentry-cli/1.46.0/sentry-cli-Windows-x86_64.exe" | |
SENTRY_DOWNLOAD_Darwin_x86_64="https://downloads.sentry-cdn.com/sentry-cli/1.46.0/sentry-cli-Darwin-x86_64" | |
SENTRY_DOWNLOAD_Linux_x86_64="https://downloads.sentry-cdn.com/sentry-cli/1.46.0/sentry-cli-Linux-x86_64" | |
VERSION="1.46.0" | |
PLATFORM=`uname -s` | |
ARCH=`uname -m` |
This file contains 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.apache.commons.lang3.StringUtils; | |
import org.junit.jupiter.api.Test; | |
import org.junit.jupiter.api.extension.ExtendWith; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.annotation.Import; | |
import org.springframework.core.env.ConfigurableEnvironment; |