Skip to content

Instantly share code, notes, and snippets.

@dhargitai
dhargitai / makeScreenshotOnFailure
Created June 10, 2014 09:34
With this Behat function you can create a screenshot when a test fails.
<?php
/**
* @AfterStep
*/
public function makeScreenshotOnFailure($event)
{
if (StepEvent::FAILED !== $event->getResult() || !($this->getSession()->getDriver() instanceof Selenium2Driver)) {
return;
}
@spikegrobstein
spikegrobstein / nginx.conf
Last active August 9, 2024 13:42
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.