Skip to content

Instantly share code, notes, and snippets.

View arcseldon's full-sized avatar

Richard Seldon arcseldon

View GitHub Profile
arcseldon / .gitconfig
Created March 21, 2019 02:18 — forked from huytd/.gitconfig
Use neovim as diff tool
tool = vimdiff
prompt = true
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
prompt = false
tool = vimdiff
arcseldon /
Created January 11, 2019 03:16 — forked from andreyvit/
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name:

arcseldon /
Created July 6, 2018 00:15 — forked from staltz/
The introduction to Reactive Programming you've been missing
arcseldon / ID-Token-Filter
Created April 27, 2018 08:02
ID Token Filter via Rule
function (user, context, callback) {
// console.log("context.request.query: ", context.request.query);
if (context.request.query && context.request.query.response_mode === 'web_message') {
console.log('sanitizing tokens...');
var namespace = '';
context.idToken[namespace + '/CRIS_ABC'] = "";
context.idToken[namespace + '/CRIS_DEF'] = "";
arcseldon / user.js
Created April 27, 2018 07:58
Sample that demonstrates calling check session
extends layout
block content
.w3-card-4.w3-center(style="padding: 15px;")
p Welcome #{user.nickname}
h2 User Profile
pre #{userProfile}
arcseldon / rule-map-email-to-nameid.js
Created April 25, 2018 06:44 — forked from woloski/rule-map-email-to-nameid.js
Salesforce Auth0 rule. This is the default mapping Auth0 will use for Salesforce. You can create a new Rule and change this with whatever you want.
function (user, context, callback) {
// this rule can be used if you have chosen to use Username as the way to identify a user in Salesforce. Notice that we are mapping the email to the nameidentifier.
if (context.clientName === 'Salesforce') {
context.samlConfiguration.mappings = {
'': 'email',
'User.Username': 'email',
'User.Email': 'email',
'User.FirstName': 'given_name',
arcseldon /
Created April 20, 2018 13:19
spring-boot-security-saml configuration options.

Configuration Properties

Configuring your Service Provider through configuration properties is pretty straight forward and most configurations could be accomplished this way. The two limitations that exists are: You can only configure what is exposed as properties, obviously, and you cannot provide specific implementations or instances of the different Spring Security SAML classes/interfaces. If you need to provide custom implementations of certain types or a more dynamic configuration you'll need to use the Java DSL approach for that configuration, but as expressed before, you can configure as much as you can through properties, while using the DSL configuration for any dynamic or custom implementations configuration. You can mix the two flavors.
The following table shows all the available properties (Parsed from Spring Configuration Metadata file).

Key Default Value Description
saml.sso.default-failure-url /
arcseldon /
Created April 15, 2018 14:36 — forked from bastman/
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

arcseldon /
Created April 4, 2018 10:23
Copy locally
package com.auth0;
* Holds the user's credentials returned by Auth0.
* <ul>
* <li><i>idToken</i>: Identity Token with user information</li>
* <li><i>accessToken</i>: Access Token for Auth0 API</li>
* <li><i>type</i>: Token Type</li>