Skip to content

Instantly share code, notes, and snippets.

@ijlee2
ijlee2 / ci-cd.yml
Last active December 8, 2022 19:16
GitHub Actions workflow for Ember apps (npm)
# The workflow template is designed for Ember apps.
#
# It assumes certain dependencies and scripts in package.json. If
# they don't apply to your project, feel free to remove irrelevant
# code in the workflow. These can be inferred from the job name.
#
# {
# "scripts": {
# "build": "ember build --environment=production",
# "build:test": "ember build --environment=test",
@Rich-Harris
Rich-Harris / service-workers.md
Last active April 21, 2024 16:24
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@mbostock
mbostock / .block
Last active February 9, 2016 01:57
Countdown
license: gpl-3.0
@branneman
branneman / better-nodejs-require-paths.md
Last active April 27, 2024 04:16
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@machty
machty / new-router-examples.md
Last active April 16, 2020 22:03
How to do cool stuff with the new Router API
@moebio
moebio / gist:5601071
Last active December 17, 2015 11:19
list of references of my talk at http://openvisconf.com
@polotek
polotek / ember_hurdles.md
Last active March 30, 2017 05:37
Hurdles getting started with Ember.js

This is a brain dump of my experience trying to get something going with Ember.js. My goal was to get to know the ins and outs of the framework by completing a pretty well defined task that I had lots of domain knowledge about. In this case reproducing a simple Yammer feed. As of this time, I have not been able to complete that task. So this is a subjective rundown of the things I think make it difficult to get a handle on Ember. NOTE: My comments are addressing the Ember team and giving suggestions on what they could do to improve the situation.

App setup

The new guides have pretty good explanation of the various parts of the framework; routers, models, templates, views. But it's not clear how they all get strapped together to make something that works. There are snippets of examples all over the place like:

App.Router.map(function() {
  match('/home').to('home');
});
@mbostock
mbostock / .block
Last active April 28, 2022 21:44 — forked from mbostock/.block
Sticky Force Layout
license: gpl-3.0