Skip to content

Instantly share code, notes, and snippets.

Avatar
👶
Working on typelog.dev in my spare time

Ilya Radchenko knownasilya

👶
Working on typelog.dev in my spare time
View GitHub Profile
View integration-on-label.yaml
name: Integration Tests
on:
pull_request:
types: [synchronize, ready_for_review, labeled]
jobs:
integration_tests_on_code_review:
name: Integration Tests on Code Review
runs-on: ubuntu-latest
@knownasilya
knownasilya / machine.js
Last active June 30, 2021 15:53
Generated by XState Viz: https://xstate.js.org/viz
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View controllers.application\.js
import Controller from '@ember/controller';
const namedValues = (event) => {
const fields = Object.keys(event.target.elements).filter(key => Number.isNaN(parseInt(key, 10)))
const values = Object.fromEntries(fields.map(key => {
let element = event.target.elements[key];
let value = element.type === 'checkbox' ? element.checked : element.value
return [key, value];
}));
View components.my-component\.js
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
let index = 0;
export default class extends Component {
@tracked obj = {
index: 0
};
@knownasilya
knownasilya / machine.js
Last active September 29, 2020 13:45
Generated by XState Viz: https://xstate.js.org/viz
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@knownasilya
knownasilya / controllers.application\.js
Created September 25, 2020 15:24
special char hash
View controllers.application\.js
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
@knownasilya
knownasilya / machine.js
Last active June 20, 2020 14:37
Generated by XState Viz: https://xstate.js.org/viz
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@knownasilya
knownasilya / machine.js
Last active August 22, 2020 03:14
Generated by XState Viz: https://xstate.js.org/viz
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@knownasilya
knownasilya / machine.js
Last active July 15, 2020 16:30
Generated by XState Viz: https://xstate.js.org/viz
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@knownasilya
knownasilya / README.md
Created November 22, 2019 17:40
state machines ember
View README.md
const machine = Machine({
  id: 'toggle',
  initial: 'inactive',
  states: {
    inactive: { on: { TOGGLE: 'active' } },
    active: { on: { TOGGLE: 'inactive' } }
  }
});