This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from '@glimmer/component'; | |
import { inject as service } from '@ember/service'; | |
import { action } from '@ember/object'; | |
export default class UiLinkTo extends Component { | |
@service router; | |
get href() { | |
return this.router.urlFor(...this.route); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from '@glimmer/component'; | |
import { action } from '@ember/object'; | |
import { tracked } from '@glimmer/tracking'; | |
import mockFetch from '../utils/mock-fetch'; | |
export default class extends Component { | |
@tracked state = 'idle'; | |
@tracked isLoading = false; | |
@tracked hasSuccess = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
title Diceware+ | |
state Bootstrap { | |
state "Booting" as Bootstrap.Booting | |
state "Done" as Bootstrap.Done | |
state "Error" as Bootstrap.Error | |
Bootstrap.Booting : invoke / fetchWords | |
Bootstrap.Booting --> Bootstrap.Done : //done// (fetchWords) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* GistID: 984b1a0084e7cb21f5c8ac1409d31866 */ | |
const EOL = Symbol('EOL'); | |
const TOKENS = { | |
[EOL]: 'END_INPUT', | |
'{': 'OPEN_BRACE', | |
'}': 'CLOSE_BRACE', | |
'/': 'OPERATION', | |
'+': 'OPERATION', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR="${1##/}" | |
DIR="${DIR-:.}" | |
entries=$(mktemp) | |
trap 'rm -f "$entries"' EXIT | |
find "${DIR}" -name node_modules -prune -atime +30d > "$entries" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Machine({ | |
id: 'timer', | |
type: 'parallel', | |
context: { | |
goal: 5000, | |
nearOvertime: 10000, | |
overtime: 15000 | |
}, | |
states: { | |
clock: { |