Skip to content

Instantly share code, notes, and snippets.


Richard Seldon arcseldon

View GitHub Profile
arcseldon / .gitconfig
Created March 21, 2019 02:18 — forked from huytd/.gitconfig
Use neovim as diff tool
View .gitconfig
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

View tmux_cheatsheet.markdown

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 / 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.
View rule-map-email-to-nameid.js
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 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

View gist:e14fcb3a5b65c8e6042ce7a6445c2aa8
var async = require('async');
var request = require("request");
var _ = require("underscore");
module.exports = function(ctx, cb) {
const api_url = '';
var access_token;
var user_id = ctx.body.user_id;
arcseldon /
Created February 18, 2018 11:13 — forked from Starefossen/
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.


New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session
arcseldon / tmux-cheatsheet.markdown
Last active February 18, 2018 10:56 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
View gist:618a1e2d87d98d1ee95c685cce908e2b

via (

  • 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.