Skip to content

Instantly share code, notes, and snippets.

View eccegordo's full-sized avatar

Gordon Potter eccegordo

View GitHub Profile
@eccegordo
eccegordo / app_view.html.erb
Created November 2, 2013 11:06
A pattern for attaching ember to a sub page/controller of a rails application.
<noscript>
<h1>This website requires that your browser support JavaScript to fully function.</h1>
<p>This website was lovingly crafted with Ember JS framework to bring you state of the art features and functionality.</p>
<h2><a href="http://www.enable-javascript.com/">Click here for instructions on how to enable JavaScript.</a></h2>
</noscript>
<div id="ember_app_container">
</div>
@eccegordo
eccegordo / gist:6971662
Created October 14, 2013 06:36
npm install log file
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/Users/gpotter/npm/bin/npm', 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose readDependencies using package.json deps
5 verbose install where, deps [ '/Users/gpotter/code/tools/Ember App Kit Stuff/ember-app-kit',
5 verbose install [ 'loom',
5 verbose install 'loom-generators-ember',
5 verbose install 'grunt-contrib-connect',
5 verbose install 'grunt',
@eccegordo
eccegordo / gist:6971659
Created October 14, 2013 06:35
EAK failed install
Last login: Fri Oct 11 20:28:11 on ttys006
╭─gpotter at gp-mbp15 in ~/code/tools/Ember App Kit Stuff using ‹ruby-2.0.0@global›
╰─○ ls
╭─gpotter at gp-mbp15 in ~/code/tools/Ember App Kit Stuff using ‹ruby-2.0.0@global›
╭─gpotter at gp-mbp15 in ~/code/tools/Ember App Kit Stuff using ‹ruby-2.0.0@global›
╰─○ npm -v
1.3.11
╭─gpotter at gp-mbp15 in ~/code/tools/Ember App Kit Stuff using ‹ruby-2.0.0@global›
╰─○ which npm
/Users/gpotter/npm/bin/npm
@eccegordo
eccegordo / eak install issue
Created October 11, 2013 07:50
Ember App Kit install issue
Last login: Thu Oct 10 18:20:55 on ttys000
╭─gpotter at gp-mbp15 in ~/code/talks using ‹ruby-2.0.0@global›
╰─○ pwd
/Users/gpotter/code/talks
╭─gpotter at gp-mbp15 in ~/code/talks using ‹ruby-2.0.0@global›
╰─○ ls
ember-app-kit-master.zip emberjs seattle meetup
╭─gpotter at gp-mbp15 in ~/code/talks using ‹ruby-2.0.0@global›
╭─gpotter at gp-mbp15 in ~/code/talks using ‹ruby-2.0.0@global›
╰─○ unzip ember-app-kit-master.zip
/* Put your CSS here */
html, body {
margin: 20px;
}
@eccegordo
eccegordo / jsbin.OvONejo.html
Created August 27, 2013 04:44
Render dynamic template based on model info
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script>
<script src="http://builds.emberjs.com/ember-latest.js"></script>
@eccegordo
eccegordo / models.js
Created August 23, 2013 21:07
Ember model fixtures, using Ember object for stubbed data.
App.Store = DS.Store.extend({
adapter: DS.FixtureAdapter.create({ latency: 400 }),
});
App.Month = DS.Model.extend({
test: DS.attr('number'),
companies: DS.hasMany('App.Company')
});
App.Company = DS.Model.extend({
See it in action
http://jsbin.com/omIZeq/4
@eccegordo
eccegordo / jsbin.oREkaXI.html
Created August 18, 2013 07:02
Ember JS Promise Example Cookie Maker
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.6/ember.min.js"></script>
<script src=" http://builds.emberjs.com.s3.amazonaws.com/ember-data-0.13.js"></script>
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://twitter.github.io/bootstrap/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://twitter.github.io/bootstrap/assets/js/bootstrap.js"></script>
<meta name="description" content="Minimalist Ember JSBin" />
<script src="http://code.jquery.com/jquery.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script>