Skip to content

Instantly share code, notes, and snippets.

View dgeb's full-sized avatar

Dan Gebhardt dgeb

View GitHub Profile
@dgeb
dgeb / queries.ts
Last active March 2, 2022 20:50
React hooks for Orbit.js
import type {QueryOrExpressions, RequestOptions} from '@orbit/data';
import {RecordQueryBuilder, RecordQueryExpression} from '@orbit/records';
export type QueryDispatch = (
queryOrExpressions: QueryOrExpressions<
RecordQueryExpression,
RecordQueryBuilder
>,
queryOptions?: RequestOptions,
queryId?: string,
@dgeb
dgeb / jsonapi-intro.md
Created October 16, 2019 21:40
Resources from talk "An introduction to JSON:API"
@dgeb
dgeb / ember-worker-talk.md
Last active August 24, 2022 09:00
Resources from my Sept 2019 talk at EmberCamp - "Worker Power!"

Worker Power!

Presentation by Dan Gebhardt at EmberCamp Chicago. September 16th, 2019.

Synopsis

Web workers bring a new layer of capabilities to web applications. Because workers operate on their own threads, they provide a way to perform processor-intensive tasks without affecting the responsiveness of an application. This talk will explore the different types of workers, including service workers and shared workers, and how to make the most of them in your Ember applications. We'll discuss the capabilities available to workers and explore different use cases, including progressive web apps.

Slides

NY Bagels

Makes 8 bagels. Total time about 2 hours.

Dough ingredients:

  • 1.5 cups water
  • 1 tablespoon dry active yeast
  • 1 tablespoon granulated sugar
  • 1 tablespoon regular olive oil (pref. not extra virgin)
@dgeb
dgeb / ember-engines-documentation.md
Created July 20, 2018 13:45
Ember Engines Documentation ToDos

Ember Engines Documentation ToDos

General

  • Almost all docs from README should be moved to ember-engines.com. Having similar but different info in both places is confusing and unmaintainable.

  • Consider using https://github.com/ember-learn/ember-cli-addon-docs to standardize the docs and guides and to make them version-specific.

  • Clarify the philosophy and intended uses for engines.

  • Is the "Why Use Engines?" section on http://ember-engines.com/ sufficient?

Keybase proof

I hereby claim:

  • I am dgeb on github.
  • I am dgeb (https://keybase.io/dgeb) on keybase.
  • I have a public key whose fingerprint is 52BC 4B26 AD09 81F5 EF37 4F2B 7A63 1487 1883 07BF

To claim this, I am signing this object:

@dgeb
dgeb / ember-cli-test-loader.md
Created September 10, 2014 20:19
ember-cli-test-loader.js

Definition of TestLoader as a class in ember-cli-test-loader:

(function() {
define("ember-cli/test-loader",
  [],
  function() {
    "use strict";

 var TestLoader = function() {
@dgeb
dgeb / context_test.js
Created May 28, 2014 17:10
Ember-Orbit RecordArray filtering
import Orbit from 'orbit';
import { RecordNotFoundException, RecordAlreadyExistsException } from 'orbit_common/lib/exceptions';
import attr from 'ember_orbit/attr';
import Context from 'ember_orbit/context';
import Store from 'ember_orbit/store';
import Model from 'ember_orbit/model';
import { createStore } from 'test_helper';
var get = Ember.get,
set = Ember.set;
@dgeb
dgeb / orbit-ember-data-adapter.js
Last active January 3, 2016 10:08
A very simple example Orbit adapter implementation for Ember Data that's hard coded with a single Orbit.LocalStorageSource. Note that the Orbit schema could easily be auto-generated from DS models. Also, DS relationships would have to be mapped to Orbit links (and the adapter would need to call `link` / `unlink` methods on Orbit stores).
export default DS.Adapter.extend({
orbitSource: undefined,
init: function() {
this._super();
Orbit.Promise = Ember.RSVP.Promise;
// TODO - autogenerate schema from DS models
var schema = {
idField: 'id',