Skip to content

Instantly share code, notes, and snippets.

David Negstad dnegstad

Block or report user

Report or block dnegstad

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am dnegstad on github.
  • I am dnegstad ( on keybase.
  • I have a public key ASAa2Vr0tTaqzNbjdQFSi6NjqrhK7vk9vZzIXFI0aoKNDQo

To claim this, I am signing this object:

dnegstad / user-data-consul-server
Created Jan 26, 2016 — forked from bdclark/user-data-consul-server
CoreOS cloud-config to bootstrap consul cluster
View user-data-consul-server
# generate a token from
advertise-client-urls: http://$private_ipv4:2379
initial-advertise-peer-urls: http://$private_ipv4:2380
listen-peer-urls: http://$private_ipv4:2380
dnegstad / polymorphic-mixin.js
Created Mar 20, 2015
Ember Polymorphic Serialization
View polymorphic-mixin.js
import Ember from 'ember';
export default Ember.Mixin.create({
normalize: function(type, hash, prop) {
if (hash.type) {
let typeKey = this.typeForRoot(hash.type);
let newType =;
if (newType) {
type = newType;
dnegstad / initializer
Created Dec 9, 2014
Keeping link-to from blowing up with webcomponent.js polyfills
View initializer
import Ember from 'ember';
layoutName: 'components/link-view'
export default {
name: 'link-to',
initialize: function() {}
dnegstad / application.js
Created Nov 21, 2014
Read only attributes in Ember Data
View application.js
import DS from 'ember-data';
serializeAttribute: function(record, json, key, attribute) {
if (attribute.options && attribute.options.readOnly) {
} else {
this._super.apply(this, arguments);
dnegstad / application.js
Created Nov 21, 2014
Shallow nested route Ember Data adapter
View application.js
import DS from 'ember-data';
export default DS.ActiveModelAdapter.extend({
buildURL: function(type, id, record) {
if (id) {
return this._super.apply(this, arguments);
var parent = this.get('parent');
var path = [];
dnegstad / Brocfile.js
Last active Jan 2, 2019
Polymer WebComponents in ember-cli >= 0.0.41
View Brocfile.js
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var pickFiles = require('broccoli-static-compiler');
var mergeTrees = require('broccoli-merge-trees');
var vulcanize = require('broccoli-vulcanize');
var app = new EmberApp();
var polymerVulcanize = vulcanize('app', {
input: 'elements.html',
output: 'assets/vulcanized.html',
You can’t perform that action at this time.