Skip to content

Instantly share code, notes, and snippets.

View cogell's full-sized avatar

B. Cedric Cogell cogell

View GitHub Profile
@cogell
cogell / machine.js
Created December 14, 2020 19:26
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@cogell
cogell / machine.js
Created July 2, 2020 15:22
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@cogell
cogell / machine.js
Created November 16, 2019 21:30
Generated by XState Viz: https://xstate.js.org/viz
const selectHomeMachine2 = Machine({
id: 'selectHomeMachine',
initial: 'inviteSearch',
context: {
home: undefined,
searchQuery: '',
searchResults: '',
},
on: {
SUBMIT: [
@cogell
cogell / machine.js
Last active November 8, 2019 22:06
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@cogell
cogell / machine.js
Created October 3, 2019 14:31
Generated by XState Viz: https://xstate.js.org/viz
const s = {
idle: "idle",
loading: "loading",
loggedIn: "loggedIn",
error: "error"
};
// event types
const e = {
login: "login",
@cogell
cogell / machine.js
Created October 2, 2019 17:36
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@cogell
cogell / default-styles.css
Created December 22, 2018 15:49
Personal default style overrides
body {
/* edge to edge content */
margin: 0;
/* system fonts used by github */
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
/* flex by default */
display: flex;
flex-direction: column;
@cogell
cogell / colors.js
Created April 8, 2018 18:27
Quick Color Utils for Styled-Components
import { convert } from 'css-color-function';
/**
* Some helpful notes:
*
* Documentation of convert interface:
* https://github.com/postcss/postcss-color-function#interface-according-to-css-specs
*
* shade: mixes color with pure black https://drafts.csswg.org/css-color/#tint-shade-adjusters
* tint: mixes color with pure white https://drafts.csswg.org/css-color/#tint-shade-adjusters
@cogell
cogell / interactive.js
Created April 8, 2018 18:27
Quick Styled-Components Interactions
import ColorUtils from './colors';
const interactive = (attr, color) =>
`
&:hover {
${attr}: ${ColorUtils.hover(color)};
}
&:active {
${attr}: ${ColorUtils.active(color)};
}

Keybase proof

I hereby claim:

  • I am cogell on github.
  • I am cogell (https://keybase.io/cogell) on keybase.
  • I have a public key whose fingerprint is 2170 7B58 6C84 104D ABF1 1419 8F92 4841 E92F 95AE

To claim this, I am signing this object: