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
# - Connection Settings - | |
listen_addresses = '*' # what IP address(es) to listen on; |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
# ... | |
config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.network "forwarded_port", guest: 443, host: 8443 | |
# ... |
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
# /etc/pf.anchors/vagrant.apache.forwarding | |
rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 80 -> 127.0.0.1 port 8080 | |
rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 443 -> 127.0.0.1 port 8443 |
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
# /etc/pf-vagrant.conf | |
# sudo pfctl -ef /etc/pf-vagrant.conf | |
rdr-anchor "forwarding" | |
load anchor "forwarding" from "/etc/pf.anchors/vagrant.apache.forwarding" |
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
<?php | |
/** | |
* @AfterStep | |
*/ | |
public function takeScreenshotAfterFailedStep($event) | |
{ | |
if ($event->getTestResult()->getResultCode() === \Behat\Testwork\Tester\Result\TestResult::FAILED) { | |
$driver = $this->getSession()->getDriver(); | |
if ($driver instanceof \Behat\Mink\Driver\Selenium2Driver) { |
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
<?php | |
/** | |
* @AfterStep | |
*/ | |
public function takeScreenshotAfterFailedStep($event) | |
{ | |
if ($event->getTestResult()->getResultCode() === \Behat\Testwork\Tester\Result\TestResult::FAILED) { | |
$driver = $this->getSession()->getDriver(); | |
if ($driver instanceof \Behat\Mink\Driver\Selenium2Driver) { |
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
default: | |
suites: | |
web: | |
paths: [ %paths.base%/features ] | |
contexts: [ WebContext ] | |
extensions: | |
Behat\MinkExtension: | |
base_url: 'https://localhost' | |
goutte: |
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
var url = 'https://www.example.com/mortgages?province_id=4'; | |
var provinceId = 7; | |
var regularExpression = new RegExp("[\\?&]" + 'province_id' + "=([^&#]*)"), | |
delimeter = regularExpression.exec(url)[0].charAt(0), | |
newUrl = url.replace(regularExpression, delimeter + 'province_id' + "=" + provinceId); | |
alert(url); | |
alert(newUrl); |
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> | |
<script | |
src="//cdn.rawgit.com/jpillora/xdomain/0.7.3/dist/xdomain.min.js" | |
master="https://www.yourdomain.ca"> | |
</script> |
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 ng-app='something'> | |
<head> | |
<meta charset='utf-8'> | |
<link rel="stylesheet" href="styles.css"> | |
</head> | |
<body> | |
<script | |
src="//cdn.rawgit.com/jpillora/xdomain/0.7.3/dist/xdomain.min.js" | |
slave="//api.yourdomain.ca/proxy.html"> |