Skip to content

Instantly share code, notes, and snippets.

View Auz's full-sized avatar

Graham McNicoll Auz

View GitHub Profile
@Auz
Auz / auth0-login.js
Created June 9, 2021 19:43
Auth0 custom login javascript for login, register, forgot password and google login
if(config && "internalOptions" in config) {
var leeway = config.internalOptions.leeway;
if (leeway) {
var convertedLeeway = parseInt(leeway);
if (!isNaN(convertedLeeway)) {
config.internalOptions.leeway = convertedLeeway;
}
}
}
@Auz
Auz / auth0-login.html
Created June 7, 2021 07:42
Auth0 custom login page example with forgot password
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Welcome to Growth Book - Sign in or register</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css">
<style>
@Auz
Auz / build-v-buy.md
Last active November 23, 2020 02:16
Build Vs Buy Table
Build Buy
Pro
  • Tight integration into your code base
  • Uses existing metrics and data, including custom metrics
  • Aware of advanced caching
  • Easy to target audiences
  • Almost immediately able to test
  • Proven statistics engine
  • Self-service front end testing admin - testing may done by non technical teams
  • Slick admin interface
  • Very easy to use
  • New features rolled out independently of your team
Con High opportunity costs to buildHigh maintenance costsGenerally poor user experienceTakes months to build rightHigh risks for incorrect resultsHave to build trustNo self-service front end testingEngineering often required to implement tests Ongoing subscription costs - some platforms can be expensiveLimited integration with code baseYet another
@Auz
Auz / quiz.js
Created December 18, 2009 23:45 — forked from kassens/quiz.js
/*
* Author: Jan Kassens
*
* Guess the results and run it in Firebug
* If you got all right with the first try you're a JS Samurai (Ninja is overused)
*/
var tasks = {
'try/finally': function(){
var PrettyForms = new Class({
Implements: [Options, Events],
options: {
parentId: 'articlepoll', //only look within this element
initClass: 'fancyform', //check for this class on input elements (radio only so far)
listenClass: 'pollrow', //the class on the element on which to attach the click event (ie, the row, or label)
//the following are for making the UE prettier: classes or colors to add/fade to when events happen (* note, the colors here could be replaced morphing from one class to another, but I assumed that is slow- though might not be *)
listenHoverClass: 'rowhover', // class to add to the listen element on hover
listenCheckedClass: 'rowchecked', // class to add to the listen element when radio is checked.
@Auz
Auz / Flext-v1.0.js
Created July 28, 2009 20:55
Flext is a mootools based flexible textarea class
/*
* Flext - A Mootools Based Flexible TextArea Class
* version 1.0 - for mootools 1.2
* by Graham McNicoll
*
* Copyright 2008-2009 - Education.com
* License: MIT-style license.
*
* Features:
* - Grows text areas when needed