Skip to content

Instantly share code, notes, and snippets.

View knownasilya's full-sized avatar
🦾
Working on Archegos

Ilya Radchenko knownasilya

🦾
Working on Archegos
View GitHub Profile
@gossi
gossi / idea.md
Last active March 19, 2021 13:33
Ember: Universal a11y helpers

Universal a11y Helpers

Given the WAI ARIA authoring practices tell you quite good how a particular widget shall behave. What - in case you are developing such a widget as a glimmer component - if you want to write tests for them? What if there is an already ready library of tests to use for them? If you as a developer did a good job and have all the markup done properly, the tests can entirely work on the accessibility tree on top of your markup. If not, the tests will fail anyway.

What about having an ember addon, that provides this a11y test library? In case you are developing a new component, you take that library and throw their tests at your code, without ever writing them yourself and be assured your component is a11y compliant. That library would do a service to the whole ember community.

Example

Here is an example, I've just finished writing. It is the first iteration, I found it quite well and useful and lead me to writing this. Basically, I was

@sindresorhus
sindresorhus / esm-package.md
Last active May 6, 2024 13:26
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@jenweber
jenweber / gist:9a58f776143c6cfedd4d750aa755c9b7
Created February 24, 2021 15:55
Ember.js proposed wikipedia article outline
- Intro - establish Ember as well-used a JavaScript framework. Include marketing differentiators.
- Philosophy - instead of philosophy and design - composition
- Features - un-editorialized
- Zero Config
- Components?, Component↔Service
- HTML First
- State management (tracked)
- Testing (& Debugging?)
- Decorators/it's just JavaScript
- VM
@pichfl
pichfl / example.hbs
Last active October 4, 2022 19:01
Media query helper for Ember.js
{{#if (match-media "(max-width:800px)")}}
MediaQuery matches
{{ else}}
MediaQuery doesn't match
{{/if}}
@vasind
vasind / ember-cli-build.js
Last active June 8, 2023 04:33
Ember CLI performance improvements and tips
// Credits to the following posts that helps me to reduce build times drastically
// https://discuss.emberjs.com/t/tips-for-improving-build-time-of-large-apps/15008/12
// https://www.gokatz.me/blog/how-we-cut-down-our-ember-build-time/
//ember-cli-build.js
let EmberApp = require('ember-cli/lib/broccoli/ember-app');
let env = EmberApp.env(),
@ggoodman
ggoodman / definition.json
Last active March 10, 2020 18:15
Definition for a state machine that tracks a node http request through its lifecycle
{
"PendingSocket": {
"kind": "Intermediate",
"onEnter": [
{}
],
"onEvent": {
"Error": [
{
"targetStates": [
@cowboyd
cowboyd / form.js
Created February 8, 2020 22:49
A microstate email form which stores its original value
class EmailForm {
original = {};
fields = {};
initialize(value) {
if (!value) {
return {original: {}, fields: {}};
}
if (!value.fields) {
return this.reset();
@lifeart
lifeart / index.html
Last active May 24, 2021 18:56
GlimmerLite web components example
<!doctype html>
<html>
<head>
<title>Glimmer Demo</title>
</head>
<body>
<script src="./app.bundle.js"></script>
<example-app />
</body>
</html>
@pfrazee
pfrazee / theme.css
Created January 31, 2020 14:16
Simple Wiki Theme
body {
--light-gray: #f7f7fc;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
margin: 0;
display: grid;
grid-gap: 10px;
grid-template-columns: 300px 1fr;
grid-template-rows: 100px 1fr;
min-height: 100vh;