Skip to content

Instantly share code, notes, and snippets.

View arcseldon's full-sized avatar

Richard Seldon arcseldon

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

tmux

start new with session name:

@arcseldon
arcseldon / introrx.md
Created July 6, 2018 00:15 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@arcseldon
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 = {
'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier': 'email',
'User.Username': 'email',
'User.Email': 'email',
'User.FirstName': 'given_name',
@arcseldon
arcseldon / docker-cleanup-resources.md
Created April 15, 2018 14:36 — forked from bastman/docker-cleanup-resources.md
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: https://github.com/chadoe/docker-cleanup-volumes

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

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

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

Sessions

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
arcseldon / tmux-cheatsheet.markdown
Last active February 18, 2018 10:56 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

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.