Skip to content

Instantly share code, notes, and snippets.

View arcseldon's full-sized avatar

Richard Seldon arcseldon

View GitHub Profile
@arcseldon
arcseldon / changepassword.js
Created November 24, 2016 04:23
Custom DB change password
function changePassword(email, newPassword, callback) {
var request = require('request');
// DEBUG ONLY
console.log('@@@ changePassword - start @@@');
console.log('email: ' + email);
console.log('newPassword: ' + newPassword);
var IDP_ENDPOINT = configuration.ENDPOINT_LOCAL + "/api/v1/changepassword";
@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 / coyo_uses.js
Created February 28, 2016 06:31 — forked from DrBoolean/coyo_uses.js
Coyoneda Uses in JS
const daggy = require('daggy')
const compose = (f, g) => x => f(g(x))
const id = x => x
//===============Define Coyoneda=========
const Coyoneda = daggy.tagged('x', 'f')
Coyoneda.prototype.map = function(f) {
return Coyoneda(this.x, compose(f, this.f))
}
@arcseldon
arcseldon / details.txt
Created May 30, 2017 03:31
override facebook
52.77.92.156 www.facebook.com
52.77.92.156 facebook.com
52.77.92.156 graph.facebook.com
52.77.92.156 login.facebook.com
52.77.92.156 www.login.facebook.com
52.77.92.156 fbcdn.net
52.77.92.156 www.fbcdn.net
52.77.92.156 fbcdn.com
52.77.92.156 www.fbcdn.com
@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 / 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)

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 / 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
@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

via (https://www.linux.com/learn/tutorials/442438-vim-tips-folding-fun)

  • zf#j creates a fold from the cursor down # lines.
  • zf/string creates a fold from the cursor to string .
  • zj moves the cursor to the next fold.
  • zk moves the cursor to the previous fold.
  • zo opens a fold at the cursor.
  • zO opens all folds at the cursor.
  • zm increases the foldlevel by one.
  • zM closes all open folds.