Skip to content

Instantly share code, notes, and snippets.

View tchardin's full-sized avatar

tdot tchardin

View GitHub Profile
@tchardin
tchardin / Pause.js
Last active November 14, 2021 16:23
Play/Pause toggle SVG button in React
import React from 'react'
const Pause = ({onPlayerClick}) => {
return (
<svg className="button" viewBox="0 0 60 60" onClick={onPlayerClick}>
<polygon points="0,0 15,0 15,60 0,60" />
<polygon points="25,0 40,0 40,60 25,60" />
</svg>
)
}
0x11e99A9A2ebE4AFfdB7209A723432f21CcC63398

Keybase proof

I hereby claim:

  • I am tchardin on github.
  • I am tdot (https://keybase.io/tdot) on keybase.
  • I have a public key ASDuhC5hOeG1jEKd2DZtXZY3edZvkfPX8xSGVn7hDcX6pgo

To claim this, I am signing this object:

var users = {
tchardin: {...},
...
}
var user1 = users[Object.keys(users)[0]]
@tchardin
tchardin / machine.js
Last active August 21, 2019 16:06
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@tchardin
tchardin / machine.js
Created March 31, 2020 15:56
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@tchardin
tchardin / machine.js
Last active April 17, 2020 20:09
Generated by XState Viz: https://xstate.js.org/viz
const CHART = 'cic';
const HISTORY = 'backToPrevStep';
// states
const LIFE_CHANGE_INTRO = 'lifeChangeIntro';
const MANAGE_COVERAGE_INTRO = 'manageCoverageIntro';
const ADD_MEMBER_REASON = 'addMemberReason';
const REMOVE_MEMBER_REASON = 'removeMemberReason';
const CHANGE_SELECTION = 'changeSelection';
const ADDRESS_ENTRY = 'addressEntry';
// A BitCurve represents a Koblitz Curve with a=0.
// See http://www.hyperelliptic.org/EFD/g1p/auto-shortw.html
type BitCurve struct {
P *big.Int // the order of the underlying field
N *big.Int // the order of the base point
B *big.Int // the constant of the BitCurve equation
Gx, Gy *big.Int // (x,y) of the base point
BitSize int // the size of the underlying field
}
@tchardin
tchardin / session.go
Created April 15, 2021 21:14
Example Storage API
type Options struct {
File string
String string
}
func (s *Storage) Put(key string, opts Options) error
// Or: