Skip to content

Instantly share code, notes, and snippets.

View arcseldon's full-sized avatar

Richard Seldon arcseldon

View GitHub Profile
@arcseldon
arcseldon / setup.md
Created November 7, 2017 04:28 — forked from shashankmehta/setup.md
Setup PHP and Composer on OSX via Brew

First install Brew on your MAC

  • Setup Brew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • brew update
  • brew tap homebrew/dupes
  • brew tap homebrew/php
  • Install PHP 7.0.+ brew install php70
  • Install mcrypt: brew install mcrypt php70-mcrypt
  • Finally, install composer: brew install composer
@arcseldon
arcseldon / gist:106d55d063b47879fb55b4d61035f477
Created October 26, 2017 03:29 — forked from jfreeze/gist:8894279
Get VI bindings in IEX (Elixir REPL)
# VI bindings in iex:
brew install rlwrap # on OSX
echo "alias iex='rlwrap -a foo iex'" >> ~/.bash_profile
echo "set editing-mode vi" >> ~/.inputrc
source ~/.bash_profile
# To run iex WITHOUT rlwrap
\iex

Cloning All Extensions

This gist contains a script for cloning all the extensions in the current directory. I recommend following the current steps, however you are free to clone these anywhere.

cd ~/Source
mkdir auth0-extensions && cd "$_"

curl https://gist.githubusercontent.com/sgmeyer/f622dd49e661c4b62e447530af2762b8/raw/c39122d57cf3ae41b6fd17019432b48edb8415e0/checkout-all-repos.sh" > checkout-all-repos.sh
@arcseldon
arcseldon / music.md
Created August 13, 2017 08:54 — forked from staltz/music.md
coding music

Not for everyone. Each programmer has their own appreciation of what is good coding music.

For when I need to think deep, debug something, or design

(From most influential to least)

@arcseldon
arcseldon / automate-login-page-email-templates.md
Created June 7, 2017 10:00 — forked from sandrinodimattia/automate-login-page-email-templates.md
Automatic configuration of the Auth0 Login Page and Email Templates

Customzing the Password Reset Page

Go to the API v2 explorer and generate a token with update:tenant_settings. Then call the tenants endpoint with the new HTML:

PATCH https://{YOUR_DOMAIN}/api/v2/tenants/settings

{
  "change_password": {
    "enabled": true,
@arcseldon
arcseldon / redirect-rule.js
Created December 5, 2016 11:32 — forked from nicosabena/redirect-rule.js
Redirect rule + webtask to do a reCaptcha after authentication
function (user, context, callback) {
// this rule requires the following configuration values:
// CAPTCHA_SECRET: a 32 bytes string that will be the shared secret between
// the rule and the webtask
// AUTH0_DOMAIN: your auth0 domain (e.g. account.auth0.com)
// CAPTCHA_REDIRECT: the URL for the webtask that will show and process CAPTCHA
// Put a specific client ID if you dont want CAPTCHA for every client
// if (context.clientID !== '[your client id]')
@arcseldon
arcseldon / contest-webtask.js
Created November 20, 2016 07:24 — forked from woloski/contest-webtask.js
Contest Signup Webtask
'use latest';
import express from 'express';
import { fromExpress } from 'webtask-tools';
import bodyParser from 'body-parser';
const app = express();
var jwt = require('express-jwt');
var jwtCheck = jwt({
import _ from 'lodash';
import fetch from 'node-fetch';
import delay from 'delay';
export async function pingServers(servers) {
let failedServers = {};
for (const url of servers) {
let failures = 0;
for (const i of _.range(3)) {
const response = await fetch(url);
@arcseldon
arcseldon / Option1.js
Created November 8, 2016 00:39 — forked from pushpabrol/Option1.js
How to use ldapjs within a custom database connection in Auth0
function login(email, password, callback) {
var ldap = require('ldapjs');
if (!global.ldapClient) {
// console.log('Global Client not found');
var client = ldap.createClient({
url: 'ldap://server:389',
idleTimeout: 30000
});
client.bind('uid=admin,ou=system', 'secret', function(err) {
@arcseldon
arcseldon / .eslintrc
Created April 29, 2016 14:57 — forked from hendrikswan/.eslintrc
Packages and build config for Build Cross Platform React Native Apps with Exponent and Redux
{
"extends": "airbnb/base",
"plugins": [
"react"
],
"env": {
"node": true,
"jasmine": true,
},
"rules": {