Skip to content

Instantly share code, notes, and snippets.

View asaschachar's full-sized avatar

Asa Schachar asaschachar

View GitHub Profile

Keybase proof

I hereby claim:

  • I am asaschachar on github.
  • I am asa_optimizely (https://keybase.io/asa_optimizely) on keybase.
  • I have a public key whose fingerprint is E1F3 310F 4D15 4ED2 649F 53D3 B118 4CD8 D605 7DE7

To claim this, I am signing this object:

@asaschachar
asaschachar / generate_fullstack_mvt.py
Last active October 17, 2017 16:29 — forked from jo-migo/generate_fullstack_mvt.py
Script to Generate a Generic Fullstack MVT
import json
import os
import pprint
import requests
import sys
'''
DIRECTIONS:
- Create a feature flag in the UI, add feature variables with default values
@asaschachar
asaschachar / setup_script.bash
Last active October 17, 2017 16:29 — forked from jo-migo/setup_script.bash
Setup Script for Fullstack MVT Generator
#!/bin/bash
# If you don't have trailmix installed, you have to run `sudo pip install -i https://localshop.dz.optimizely.com/simple/ --upgrade --ignore-installed trailmix` first!!
export PISTACHIO_PATH=dev
export PISTACHIO_BUCKET=optimizely-pci-pistachio
eval $(trailmix --escape-quotes -f exports frontdoor)
export PROXY_SHARED_SECRET=$THREESCALE_SHARED_SECRET
@asaschachar
asaschachar / project_javascript
Created July 20, 2018 01:26
Project JavaScript
if (isComplex) {
for (var i=6, j='crazy'; i<isComplex.length; i+=3) {
while(j.length < 20) {
j = j.concat('hello');
switch (i % 2) {
case 0:
j = j.concat('U');
break;
case 1:
j = j.concat('U');
@asaschachar
asaschachar / project_javascript
Created July 20, 2018 01:31
Project JavaScript
if (isComplex) {
for (var i=6, j='crazy'; i<isComplex.length; i+=3) {
while(j.length < 20) {
j = j.concat('hello');
switch (i % 2) {
case 0:
j = j.concat('U');
break;
case 1:
j = j.concat('U');
@asaschachar
asaschachar / project_javascript
Created July 20, 2018 01:32
Project JavaScript
if (isComplex) {
for (var i=6, j='crazy'; i<isComplex.length; i+=3) {
while(j.length < 20) {
j = j.concat('hello');
switch (i % 2) {
case 0:
j = j.concat('U');
break;
case 1:
j = j.concat('U');
// Requires node v7.6 or greater
// npm install --save @optimizely/optimizely-sdk request request-promise
const optimizely = require('@optimizely/optimizely-sdk');
const request = require('request-promise');
// The datafile url for your project & environment
const DATAFILE_URL = 'https://cdn.optimizely.com/datafiles/QMVJcUKEJZFg8pQ2jhAybK.json';
const user = {
id: 'user123',
/**
* Optimizely Node Datafile Manager
*
*
* USAGE - INSTALLATION
* // Pre-requisites: npm install --save request-promise request @optimizely/optimizely-sdk
* // Save this file in a file named optimizely-manager.js
* const createOptimizelyManager = require('./optimizely-manager')
* const optimizelyManager = createOptimizelyManager('Ly8FQj6vSaDcZUjySoWnWz')
*

Wrapper - Rollouts SDK

import OptimizelyManager from '@optimizely/optimizely-rollouts-sdk';
OptimizelyManager.configure({
  sdkKey: 'Ly8FQj6vSaDcZUjySoWnWz'
})

const optimizely = OptimizelyManager.getClient();
const enabled = optimizely.isFeatureEnabled('sale_price');
@asaschachar
asaschachar / Optimizely_Individual_CLA.md
Last active April 17, 2019 18:31
Optimizely Inc. Individual Contributor License Agreement (CLA)

Optimizely Inc. Individual Contributor License Agreement

An Individual Contributor License Agreement (an "Agreement") is required to establish and define the intellectual property license granted in connection with Contributions (defined below) from any person or entity to Optimizely, Inc. ("Optimizely") for inclusion in any of the software, products, content, or services owned or managed by Optimizely (the "Work"). This Agreement is for your protection as well as Optimizely’s. This Agreement does not alter your rights to use your own Contributions for other purposes. By executing this Agreement, You accept and agree to the following terms and conditions for any past, current, or future Contributions submitted to Optimizely. Except for the license granted herein to Optimizely and recipients of software, products, content, or services delivered by Optimizely, you reserve all right, title, and interest in and to the Contributions you create.

1. Definitions.

"Control" shall mean (i) the power, direct or