Skip to content

Instantly share code, notes, and snippets.

@abuecker
abuecker / machine.js
Created December 11, 2020 22:18
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@abuecker
abuecker / machine.js
Last active December 11, 2020 22:17
Generated by XState Viz: https://xstate.js.org/viz
const messageMachine = Machine(
{
id: 'message',
initial: 'idle',
context: {
duration: 5000,
elapsed: 0,
interval: 250,
percent: 0,
},
@abuecker
abuecker / machine.js
Created December 1, 2020 17:37
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@abuecker
abuecker / GitSshNotes.md
Last active September 5, 2018 22:45
Git Ssh Notes.md

Add an environment variable:

GIT_SSH_COMMAND='ssh -i private_key_file' git clone user@host:repo.git

Add the key to the ssh agent:

ssh-agent bash -c 'ssh-add /somewhere/yourkey; git clone git@github.com:user/project.git'

Test the connection:

import urwid
#-------
# Model
#-------
model = {
'value': 0
}

Keybase proof

I hereby claim:

  • I am abuecker on github.
  • I am abuecker (https://keybase.io/abuecker) on keybase.
  • I have a public key ASCFY_1xxyaVPlNBNggR5tyWUgk5-1cjZtGB-Nxrf0l9cgo

To claim this, I am signing this object:

@abuecker
abuecker / tmux-256color.terminfo
Created December 31, 2015 18:53
OSX El Capitan tmux 2.1 italics terminfo
# Reconstructed via infocmp from file: /usr/share/misc/terminfo
# Install with: tic -x <filename>
tmux-256color|tmux with 256 colors,
OTbs, OTpt, am, ccc@, hs, km, mir, msgr, xenl, AX, G0,
colors#256, cols#80, it#8, lines#24, ncv@, pairs#32767, U8#1,
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
@abuecker
abuecker / Oauth2_workflow.md
Last active September 16, 2015 00:19
OAuth2 Password Workflow

Image

Authentication

User->API: grant_type=password&username=&password= + \n Authorization: Basic (b64(clientId:clientSecret))
API->API: getClient()\nVerify the clientId and Secret
API->API: grantTypeAllowed()\nIs this client authorized for the grant type
API->API: getUser()\nIs the user valid
API-&gt;API: saveAccessToken()\nSave the token for the user