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.hamcrest.Matchers; | |
import org.junit.After; | |
import org.junit.Assert; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.Keys; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.openqa.selenium.chrome.ChromeOptions; |
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.github.tomakehurst.wiremock.client.WireMock; | |
import com.github.tomakehurst.wiremock.core.WireMockConfiguration; | |
import com.github.tomakehurst.wiremock.junit.WireMockClassRule; | |
import org.junit.AfterClass; | |
import org.junit.ClassRule; | |
import org.junit.Test; | |
import java.util.List; | |
import java.util.stream.Collectors; |
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
package debugger.test; | |
import org.junit.Test; | |
/** | |
* To show a "weird" behavior of Intellij IDEA and Eclipse debuggers. | |
* | |
* Here we have the class SelfObj that has a field that is a self reference. | |
* | |
* Set the breakpoint at the line shown, and inspect the variable selfObj. |
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
/** | |
* With JUnit's @Rule, any exception thrown while closing a resource | |
* is automatically caught, so that all of the resource-closers can be executed. | |
* | |
* Set two breakpoints, where indicated, to see it yourself. | |
* If the execution stops twice, that means that all of the resource-closers have been executed, | |
* despite the fact the first threw an exception. | |
*/ | |
public class TearDownResourcesJUnit { |
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 | |
# Test bug in git | |
# if you stash untracked files only | |
# then the stash looks empty by `stash show -p` | |
# but actually `stash apply` restores the empty files. | |
# | |
REPO_DIR=/tmp/test-git-stash-bug-$( date +%F_%H%M%S ) | |
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.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.TimeUnit; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.TimeoutException; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.openqa.selenium.firefox.FirefoxDriver; | |
import org.openqa.selenium.support.ui.ExpectedCondition; |
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
/** | |
* Enter the text with {@link WebElement#sendKeys(CharSequence...)} and loop | |
* (max 50 attempts) until the text is found to have been actually fully entered. | |
* Needed when for some reason (maybe some JS making WebDriver lose focus from the field) | |
* {@link WebElement#sendKeys(CharSequence...)} does not do its job and does not send all the | |
* characters it was asked to. | |
* | |
* @param text the text to enter in the text field | |
* @param textField a text field | |
* @param driver |
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
[uwsgi] | |
proj_name = %n | |
# load variables | |
ini = /var/local/django/%n/uwsgi/vars.ini | |
ini = /etc/uwsgi/templates/include/vars.ini | |
ini = /etc/uwsgi/templates/include/vars-shared.ini | |
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
[program:uwsgi-emperor] | |
command=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites-enabled/ --pidfile /var/run/uwsgi/uwsgi-emperor.pid --auto-procname --emperor-stats-server /var/run/uwsgi/uwsgi-emperor-stats.sock | |
stdout_logfile=/var/log/uwsgi/%(program_name)s.log | |
redirect_stderr=true ; redirect proc stderr to stdout (default false) | |
autostart=true ; start at supervisord start (default: true) | |
autorestart=unexpected ; whether/when to restart (default: unexpected) | |
priority=998 ; the relative start priority (default 999) |