Skip to content

Instantly share code, notes, and snippets.

View validkeys's full-sized avatar

Kyle Davis validkeys

  • Belongs to one
  • Toronto, ON
View GitHub Profile
@currentModel.save().then(=>
@transitionTo 'project', @currentModel
, (error) =>
console.debug(error)
)
@validkeys
validkeys / Component Usage
Created July 29, 2014 12:40
Validated Ember Input
{{v-input classNames="spec-fn" value=first_name name="first_name" model=model}}
ersion: 36
************* startProtect 2datetime: Mon Jul 21 2014 13:15:57 GMT-0400 (Eastern Daylight Time)
***************** AddSPShowAd clsPlugin.IsShowAD: 0
***************** AddSPShowAd clsPlugin.IsShowADName:
************** IsShowAD Off
************* startProtect 2datetime: Mon Jul 21 2014 13:15:57 GMT-0400 (Eastern Daylight Time)
***************** AddSPShowAd clsPlugin.IsShowAD: 0
***************** AddSPShowAd clsPlugin.IsShowADName:
************** IsShowAD Off
Initializing Google Analytics.
@validkeys
validkeys / start-app.js
Last active August 29, 2015 14:04
My Ember-CLI start-app.js
/* global require */
var Application = require('client/app')['default'];
var Router = require('client/router')['default'];
import Ember from 'ember';
// Because I want to see the final state of each
// test visually in the preview window, I only reset the app
// in the setup method of each module. Which ofcourse causes an issue because the last
// test run in a module doesn't destroy the app before the next module -- leading to an error
{
"asset_id": "000a120a0000e5f1c3c4398d",
"asset_title": "Intel IT developing enterprise social computing strategy paper",
"article_src_domain": "ibr.isgearform.com",
"account_id": "001ef7ca0000edb232906077",
"keen": {
"timestamp": "2014-07-22T19:08:10.392Z",
"created_at": "2014-07-22T19:08:10.392Z",
"id": "53ceb69a33e4067cccc88a8e"
},
events.js:72
throw er; // Unhandled 'error' event
^
TypeError: Cannot call method 'replace' of undefined
at cleanAttributeValue (/Users/kyledavis/Sites/pressly-ng/dashboard/webapp/node_modules/gulp-htmlmin/node_modules/html-minifier/dist/htmlminifier.js:612:45)
at normalizeAttribute (/Users/kyledavis/Sites/pressly-ng/dashboard/webapp/node_modules/gulp-htmlmin/node_modules/html-minifier/dist/htmlminifier.js:742:17)
at Object.HTMLParser.start (/Users/kyledavis/Sites/pressly-ng/dashboard/webapp/node_modules/gulp-htmlmin/node_modules/html-minifier/dist/htmlminifier.js:909:23)
at parseStartTag (/Users/kyledavis/Sites/pressly-ng/dashboard/webapp/node_modules/gulp-htmlmin/node_modules/html-minifier/dist/htmlminifier.js:246:19)
at String.replace (native)
at new global.HTMLParser (/Users/kyledavis/Sites/pressly-ng/dashboard/webapp/node_modules/gulp-htmlmin/node_modules/html-minifier/dist/htmlminifier.js:145:22)
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~xsl/irss-to-html.xsl?lid=1"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>Your latest content recommendations from Primal</title>
<link>https://content.primal.com/.rss?lid=ih5ArFQzd4Dg_dl4AoQLdZ6UzBe5hfWqhEAan0pg2HgVpx-PoxDdOCCq4UxPcPHu</link>
<description>Primal aggregates online content from the Web and targets it to your specific topics of interest.</description>
<language>en-us</language>
<copyright>Copyright 2014, Primal Fusion Inc.</copyright>
<webMaster>support@primal.com (Primal Support)</webMaster>
`import Ember from 'ember'`
PostRoute = Ember.Route.extend
model: (params) ->
@store.find('post', params.post_id)
afterModel: (model) ->
childPosts = []
`import { test, moduleForComponent } from 'ember-qunit'`
moduleForComponent 'iteration-card', 'IterationCardComponent', {
# specify the other units that are required for this test
# needs: ['component:foo', 'helper:bar']
}
test 'it renders', ->
expect 2
<div id="pressly-embed" style="min-height: 100%" data-pressly-hub="http://validkeys.pressly.com/architectural-digest"></div>
<script type="text/javascript" src="http://cdn.pressly.com/clients/dailymeal/pressly-app-embed.js"></script>