Skip to content

Instantly share code, notes, and snippets.

View mmoravec's full-sized avatar

Matt Moravec mmoravec

  • San Francisco, CA
View GitHub Profile
var settings = {
"async": true,
"crossDomain": true,
"url": "https://netverify.com/api/netverify/v2/initiateNetverify",
"method": "POST",
"headers": {
"Accept": "application/json",
"Content-Type": "application/json",
"User-Agent": "'ThorToken Whitelist/0.0.1'",
"mode": "'cors'",
function* getToken(action) {
const params = {
method: 'POST',
mode: 'cors',
body: JSON.stringify({
merchantIdScanReference: 'YOURSCANREFERENCE1',
successUrl: 'https://www.your-site.com/sucess',
errorUrl: 'https://www.your-site.com/error',
}),
headers: new Headers({
## Matt Moravec contributions week ending Feb 4, 2018
### CoZ Devcon
* Setup and hosted CoZ event pre-devcon @ABV
* Helped host hackathon @Github Offices
### Hackernoon
* Published an article helping developers in Silicon Valley learn about NEO and awesome CoZ projects https://hackernoon.com/get-a-sneak-peek-at-neo-devcon-with-thor-tokens-cto-matt-moravec-f00d75bbff2d
window['optimizely'] = window['optimizely'] || [];
if (window.jQuery("meta[name='section']").length > 0) {
window['optimizely'].push({
type: "page",
pageName: "section_page",
tags: {
category: window.jQuery("meta[name='section']").attr('content'),
type: window.jQuery("meta[property='og:type']").attr('content') === 'website' ? 'section_front' : window.jQuery("meta[property='og:type']").attr('content'),
title: window.jQuery("meta[property='og:title']").attr('content')
}
{
"plugin_id": "exit_intent",
"plugin_type": "widget",
"name": "Exit Intent Popup",
"edit_page_url": "http://www.atticandbutton.us",
"form_schema": [
{
"default_value": "Don't go!",
"field_type": "text",
"name": "headline",
{
"plugin_id": "newsletter_desktop",
"plugin_type": "widget",
"name": "Desktop Newsletter",
"edit_page_url": "http://www.cnn.com/2016/10/03/health/nobel-prize-2016-physiology-medicine-yoshinori-ohsumi/index.html",
"form_schema": [
{
"default_value": "http://i.cdn.turner.com/cnn/.element/img/4.0/political-newsletter/political-5things-logo.png",
"field_type": "image",
"name": "image",
// if logic to prevent experiment from running on itself in the editor.
if (window.location.search.match(/\d/g).join("") !== 5450482367) {
(function() {
'use strict';
var experiment_id = window.location.search.match(/\d/g).join("");
var current_timestamp;
var next_timestamp;
var _$;
// Wait for jQuery to be enabled on the page.
/* Place this code in Project JS.
* This code randomly selects either one experiment marked with an [ME], one experiment from each group denominated with [Group_A] where A is any character the user wishes to use. The code is evaluated before url targeting and audiencing.
*
* The way it works is:
* - Let's say we have 3 groups with 3 experiments in each group, 3 experiments marked with an [ME], and 5 experiments not marked with a [Group_X] or an [ME].
* [Group_A] Exp 1, [Group_A] Exp 2, [Group_A] Exp 3, [Group_A] holdout
* [Group_B] Exp 4, [Group_B] Exp 5, [Group_B] Exp 6, [Group_B] holdout
* [Group_C] Exp 7, [Group_C] Exp 8, [Group_C] Exp 9, [Group_C] holdout
* [ME] Exp 10, [ME] Exp 11, [ME] Exp 12, [ME] holdout
*
<script type="text/javascript">
function getOptimizelyTestMap(e) {
if ("undefined" != typeof window["optimizely"]) {
var allTests = window["optimizely"].allExperiments
, charCount = 0
, siteCatalyst = s_gi(s_account)
, variationMap = window["optimizely"].variationMap
, variationMapActive = [] // Leave behind only tests that are still running
;
/* Place this code in Project JS.
* This code randomly selects either one experiment marked with an [ME], one experiment from each group denominated with [Group_A] where A is any character the user wishes to use. The code is evaluated before url targeting and audiencing.
*
* The way it works is:
* - Let's say we have 3 groups with 3 experiments in each group, 3 experiments marked with an [ME], and 5 experiments not marked with a [Group_X] or an [ME].
* [Group_A_ME] Exp 1, [Group_A_ME] Exp 2, [Group_A] Exp 3, [Group_A] holdout
* [Group_B] Exp 4, [Group_B] Exp 5, [Group_B] Exp 6, [Group_B] holdout
* [Group_C] Exp 7, [Group_C_ME] Exp 8, [Group_C] Exp 9, [Group_C] holdout
* [ME] Exp 10, [ME] Exp 11, [ME] Exp 12, [ME] holdout
*