Skip to content

Instantly share code, notes, and snippets.

<div>
{loading ? (
<Flex align="center" sx={{ py: 5 }}>
<Loading size="large" color="#ccc" />
</Flex>
) : null}
{ (
<Stack spacing={3}>
<Text as="div">
<a onClick={() => navigate(-1)}>Return to your breach list</a>
@trabianmatt
trabianmatt / machine.js
Last active January 11, 2021 23:42
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetch',
initial: 'idle',
context: {
retries: 0,
},
states: {
idle: {
on: {
OPEN: 'gettingUserIdFromDatabase',
@trabianmatt
trabianmatt / machine.js
Last active December 28, 2020 15:34
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetch',
initial: 'idle',
context: {
retries: 0,
},
states: {
idle: {
on: {
OPEN: 'gettingUserIdFromDatabase',
@trabianmatt
trabianmatt / machine.js
Created December 17, 2020 18:09
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetch',
initial: 'idle',
context: {
retries: 0,
},
states: {
idle: {
on: {
OPEN: 'checkingTermsAccepted',
@trabianmatt
trabianmatt / machine.js
Created September 13, 2019 15:58
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@trabianmatt
trabianmatt / frontend-stack.md
Last active March 28, 2016 23:34
Trabian's Frontend Stack

Note: This is a portion of a project README and contains links to files within that project that are not applicable to this gist but are included anyway to show how this is used.

Frontend Stack

Build Tools

Babel

Babel is a JavaScript compiler that converts new syntax such as that provided by ES2015 (and beyond) into JavaScript that's compatible on browsers that don't support the latest standards. The Babel configuration for this application is located at .babelrc.

@trabianmatt
trabianmatt / binding_test.coffee
Created January 16, 2013 15:47
Bindings test
helpers = require '../../../helpers'
{ assert } = helpers.chai
describe 'Backbone.View binding', ->
beforeEach ->
class SampleView extends Backbone.View
@trabianmatt
trabianmatt / 1_index.coffee
Last active December 11, 2015 03:39
A preview of what's in store for titanium-backbone. (Ignore the numbers and underscores in the file names - they are intended only to provide order to the gists).
SampleWindow = require './window'
person = new Backbone.Model
name: 'John Doe'
sampleWindow = new SampleWindow
model: person
sampleWindow.render().open()
@trabianmatt
trabianmatt / sample_view.coffee
Last active December 11, 2015 03:39
sample titanium-backbone view
template = require './template'
module.exports = class Window extends Backbone.View
viewName: 'Window'
attributes:
backgroundColor: '#eee'
layout: 'vertical'
@trabianmatt
trabianmatt / template.jade
Created January 15, 2013 15:20
Sample template
Label= title
View(layout='horizontal', top=11)
Button.clickable I work!
Button.notclickable I don't!