Skip to content

Instantly share code, notes, and snippets.

Adolfo Abegg adolfoabegg

Block or report user

Report or block adolfoabegg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View VendoSignature.php
<?php
/*
USAGE:
$urlToSign = 'https://secure.vend-o.com/v/signup?site=123123&affiliate_id=0';//this is just an example
$vendoSigner = new VendoSignature('YOUR-SHARED-SECRET');
$signedUrl = $vendoSigner->sign($urlToSign);
//Output example: https://secure.vend-o.com/v/signup?site=123123&affiliate_id=0&signature=scKxBO5UlS1vQHxORr3xuBL4Fb8
*/
@adolfoabegg
adolfoabegg / apache-vendo-ab-test.conf
Created Feb 11, 2016
Vendo A/B Test - Apache configuration.
View apache-vendo-ab-test.conf
# We need to add these lines to NATS' virtual host configuration
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{REQUEST_URI} track/(.*)(/.*)?$
RewriteRule ^track/(.+)(/(.+))?$ ab/vendo-ab-test.php?nats=$1 [L,NC]
@adolfoabegg
adolfoabegg / vendo-ab-test.php
Created Feb 11, 2016
Vendo A/B Test script for NATS
View vendo-ab-test.php
<?php
//NATS' tracker url (with a trailing slash)
$natsTrackUrl = 'http://natsv4.staging.vend-o.com/track/';
//NATS' signup url
$natsSignupUrl = 'http://natsv4.staging.vend-o.com/signup/signup.php';
$configuration = array(
//maps all current tours of SiteID 11 to the new tour (88) configured for the Vendo A/B test
'11.*' => '88', //assumes the current tours' traffic is being processed by the other biller. The new tour 88 sends the traffic to Vendo.
//The A/B split will occur between all the current tours (A) and the new one configured for Vendo (B)
You can’t perform that action at this time.