Skip to content

Instantly share code, notes, and snippets.

View knownasilya's full-sized avatar
🌒
And, behold, I come quickly; and my reward is with me.. Rev 22:12

Ilya Radchenko knownasilya

🌒
And, behold, I come quickly; and my reward is with me.. Rev 22:12
View GitHub Profile
@barnabas-avalara
barnabas-avalara / kink-functions.js
Last active November 11, 2020 16:54
TurfJS kink functions
import difference from '@turf/difference'
import { feature, multiPolygon, polygon, featureCollection, multiPoint } from '@turf/helpers'
import { getGeom } from '@turf/invariant'
import { flattenEach, featureEach } from '@turf/meta'
import simplepolygon from 'simplepolygon'
import gpsi from 'geojson-polygon-self-intersections'
export function unkinkPolygon (geojson) {
const features = []
@knownasilya
knownasilya / get-qp.js
Created July 10, 2018 15:23
My Ember test helpers
import { currentURL } from '@ember/test-helpers';
export default function getQp(name, url=currentURL()) {
if (!url || !name) {
return;
}
let [, qps] = url.split('?');
let pairs = qps.split('&');
let [found] = pairs.filter((item) => item.includes(`${name}=`));
semantic-dom-selectors -----> ember-semantic-test-helpers
          |                           |
          |                           |
          |                           |   
      qunit-semantic-assertions ------
          |
          |
          |
 qunit-dom
@lifeart
lifeart / my-component.md
Last active June 25, 2018 21:52
Ember HBX syntaxis example

handlebars -> hbx -> ?

[Example]

JSX-like hbx syntaxis approach

Ember bring me ability to write less javaScript code. But templates syntaxis is pretty huge.

For example, why we do {{if (or (and a b) (eq d e) ) m n}}

@knownasilya
knownasilya / README.md
Last active June 7, 2018 19:57
Ember Addons List
@knownasilya
knownasilya / README.md
Last active June 19, 2018 17:15
sql festival by Paul Ramsey
@jayjayjpg
jayjayjpg / ember-questions-readers-questions.md
Last active November 22, 2018 03:09
Ember-related Readers' Questions (Ember.js Times)
  • a) What's the status of being able to use ES classes?
  • b) I just started learning Ember and would like to get more experience with the project by contributing to it. What's a good way for me to get started in open-source work related to Ember and to get more familiar with its internals at the same time? answered by @jessica-jordan
  • c) When the re hydration will land in Ember? and what about the incremental rendering?
  • d) Why Ember ships with RSVP instead of a Promise polyfill? answered by @ef4
  • e) How is didReceiveAttrs better than observers, or is it just as bad?
  • f) Is module unification something you can use today in an app? It seems like a lot of the discussion revolves around usage in addons, corner cases, or require using canary versions of Ember. answered by @jenweber
  • g) I've seen the Glimmer site and explanation but I'm still not sure if I should be thinking about Glimmer as solving my front end lightweight framework needs. For instance, should I go ahead and assume I can use Glimme
@anulman
anulman / README.md
Last active April 26, 2018 08:54
Ember.js publishing tools

Ember publishing tools

This document is intended as a "scratchpad" to think through Ember-based systems.

CMS Design Requirements

  • MUST have a content store
    • Content MAY be stored with source
    • Content models MAY be related to other, differently-formed content models
  • MUST support POJO content metadata
@jgwhite
jgwhite / mirage-scenarios-default.js
Last active February 28, 2018 18:38
Persisting Mirage’s DB in development
// mirage/scenarios/default.js
export default function(server) {
function store() {
let data = server.db.dump();
let json = JSON.stringify(data);
localStorage.mirage = json;
}

The goal

I usually find it help to start with the API we want, and work backwards. For models, we want something like:

import Post from '../models/post';

class CreatePost extends Action {
  respond({ body }) {
    let post = new Post();   // <- Just a simple `new Post()`