Skip to content

Instantly share code, notes, and snippets.

View givanse's full-sized avatar
:shipit:
ON A BOAT

Gastón Silva givanse

:shipit:
ON A BOAT
View GitHub Profile
@givanse
givanse / one-controlelr-two-templates.html
Last active August 29, 2015 14:01
Two separate Routes/Templates sharing a single Controller.
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script>
<script src="http://builds.emberjs.com.s3.amazonaws.com/tags/v1.0.0/ember.js"></script>
<meta charset="utf-8">
<title>1 controller, 2 templates</title>
</head>
<body>
@givanse
givanse / jsbin.ovumod.html
Created May 11, 2014 20:07
One route handles two models/controllers/templates and renders in a single template with two {{outlet}}s.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>AB</title>
</head>
<body>
<script type="text/x-handlebars">
One route handles 2 models as 1, with 2 templates.
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script>
<script src="http://builds.emberjs.com.s3.amazonaws.com/tags/v1.0.0/ember.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
@givanse
givanse / jsbin.zirut.html
Created May 13, 2014 11:02
Nested resources showing the 'render out of order' bug
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Nested resources showing the 'render out of order' bug" />
<meta charset="utf-8">
<title>render out of order bug</title>
</head>
<body>
<script type="text/x-handlebars">
@givanse
givanse / index.html
Last active August 29, 2015 14:01
Action Bubbling With Nested Routes
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Action Bubbling With Nested Routes" />
<!-- http://emberjs.jsbin.com/latib/1/edit?html,js,console,output -->
<meta charset="utf-8">
<title>Ember Starter Kit</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
@givanse
givanse / readme
Last active August 29, 2015 14:02
Netflix in Linux
sudo apt-add-repository ppa:pipelight/stable
sudo apt-get update
sudo apt-get install --install-recommends pipelight-multi
sudo pipelight-plugin --update
sudo pipelight-plugin --enable silverlight
Install:
https://addons.mozilla.org/en-US/firefox/addon/user-agent-overrider/
Set the user agent to: Windows / Firefox
@givanse
givanse / c-disqus.hbs
Last active August 29, 2015 14:02 — forked from alejandro/app.js
A Disqus component for Ember.js
<div id="disqus_thread"></div>
/* Put your CSS here */
html, body {
margin: 20px;
}
div.outlet {
border: 1px solid black;
border-radius: 4px;
min-height: 20px;
margin: 2px;
/* Put your CSS here */
html, body {
margin: 20px;
}
li {
border: 1px solid #e0e0e0;
border-radius: 4px;
margin: 1px;
padding: 2px;
@givanse
givanse / after-render.js
Last active May 22, 2016 15:26
afterRenderEvent mixin
import Ember from 'ember';
export default Ember.Mixin.create({
/*
This hook is guaranteed to be executed when the root element of this view has been inserted into the DOM.
*/
didInsertElement : function(){
this._super();
Ember.run.scheduleOnce('afterRender', this, this.afterRenderEvent);