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
.cta:hover .cta-arrow { | |
transform: translateX(3px); | |
} | |
.underline { | |
padding:9px 0 6px; | |
display:inline-block; | |
position:relative | |
} |
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
const fastcsv = require("fast-csv"); | |
const { createWriteStream } = require("fs"); | |
const unmailables = require("./unmailable"); | |
const unsubscribers = require("./nps_unsub"); | |
const Q2_List = require("./2019_Q2"); | |
const ws = createWriteStream("out.csv"); | |
const { random } = Math; | |
let mailable = []; |
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
keyCode = Object.freeze({ | |
'TAB': 9, | |
'RETURN': 13, | |
'ESC': 27, | |
'SPACE': 32, | |
'PAGEUP': 33, | |
'PAGEDOWN': 34, | |
'END': 35, | |
'HOME': 36, | |
'LEFT': 37, |
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
import { useRef, useEffect, useState } from 'react' | |
import { findDOMNode, createPortal } from 'react-dom' | |
export default function usePortal({ | |
closeOnOutsideClick = true, | |
closeOnEsc = true, | |
renderBelowClickedElement, // appear directly under the clicked element/node in the DOM | |
bindTo, // attach the portal to this node in the DOM | |
isOpen: defaultIsOpen = false |
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
from future import print_function | |
import time | |
import launchdarkly_api | |
import csv | |
import datetime | |
Configure API key authorization: Token | |
configuration = launchdarkly_api.Configuration() | |
configuration.api_key['Authorization'] = 'api' |
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 request = require('request-promise'); | |
var ldEnv = 'dev'; | |
var ldProjKey = 'default'; | |
var featureFlag = 'armada-ui'; | |
var ldApiKey = process.env.LD_API_KEY; | |
// it is assumed this ldProjKey/featureFlag/ldEnv combo has at least 2 rules available | |
if(!ldApiKey){ |
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
""" A routine which simulates traffic in an A/B experiment. The binary flag being used has been configured | |
to rollout at 10% True 90% False. Below in the code, a loop is entered to simulate 1,000 unique users. | |
The True variant will hit the goal 80% of the time. The False variant will hit the goal 30% of the time. | |
So in LD, we should see the following insight numbers for the flag: | |
Flag Evaluations: | |
True: 100 (10% of 1,000) | |
False: 900 (90% of 1,000) | |
Conversions: | |
True: 80/100 (80% goal hit) | |
False: 270/900 (30% goal hit) |
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
#!/usr/bin/env python3 | |
""" | |
Requirements: | |
pip install requests python-dateutil | |
""" | |
import dateutil.parser as dp | |
import csv | |
import sys | |
from optparse import OptionParser |
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
# !/bin/sh | |
ecco_the_dolphin=( | |
"$(tput setaf 5)Installing Homebrew...$(tput sgr 0)" | |
"$(tput setaf 2)Please enter the password 🔑 you use to login to your computer$(tput sgr 0)" | |
) | |
for ecco_the_dolphin in "${ecco_the_dolphin[@]}"; do | |
echo "$ecco_the_dolphin" | |
done |
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
# See list of docker virtual machines on the local box | |
$ docker-machine ls | |
NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS | |
default * virtualbox Running tcp://192.168.99.100:2376 v1.9.1 | |
# Note the host URL 192.168.99.100 - it will be used later! | |
# Build an image from current folder under given image name | |
$ docker build -t gleb/demo-app . |
NewerOlder