Skip to content

Instantly share code, notes, and snippets.

@jvenator
jvenator / ember-cli-tutorial-spec.md
Created April 1, 2014 07:05
Spec of for updated Ember tutorial using Ember-CLI.

Overview

Complete a deployed version of an app similar to that demonstrated in CodeSchool's Ember course using Ember-CLI.

Features

  • Use ember-cli
  • Two resources w/ associations (products > reviews)
  • Three views/routes (home, products, product)
  • CSS Framework (Foundation or Bootstrap)
App.Router.map(function() {
this.route('user-guide'),
this.resource('listings', function() {
// assumes scoping of listings (property, portfolio, mgr) occurs in index
this.resource('listing');
});
this.resource('application-packages', function() {
this.resource('application-package', function() {
// the index for applications sits in the application-packages route
this.resource('application');
results: {
collection1: [
{ Monday: [
{
ClassName: "Cycling",
ClassDetails: "7:00 AM - 7:45 AM 13th Street Colleen Richards"
},
{
ClassName: "Sole Power™",
ClassDetails: "9:15 AM - 10:00 AM 13th Street Taro Kawai"
results: {
collection1: [
{ Monday: [
{
ClassName: "Cycling",
StartTime: "7:00 AM",
EndTime: "7:45 AM",
Location: "13th Street",
Instructor: "Colleen Richards"
},
@jvenator
jvenator / broccoli.js
Created July 14, 2014 17:24
Updated pickFiles path for including Bootstrap glyphicons with Ember-CLI
...
var bootstrapFonts = pickFiles('vendor/bootstrap-sass-official/assets/fonts/bootstrap', {
...
});
...
@jvenator
jvenator / Brocfile.js
Last active August 29, 2015 14:13
register a custom ember easyForm form wrapper in Ember-CLI app
...
// ember-easyForm wrapper
app.import('vendor/form-wrapper-file.js');
...
@jvenator
jvenator / gist:1588334
Created January 10, 2012 10:12
Leveraged Returns In Real Estate Explained
One way to achieve higher investment returns in real estate is to use leverage or debt. It can allow one to
achieve significantly higher returns, and place most of the downside risk on lender. However, it makes the
investment return more sensitive to changes in the property’s financial performance.
Let’s consider a property that is purchased for $10.0 million and has NOI of $800k
(net operating income = revenue – expenses excl. debt). If the purchase is all cash,the annual return
(aka – cash on cash) is 8.0% ($800k / $10.0M = 8.0%). If the buyer gets a loan at 80% LTV (loan to value)
or $8.0M with a 7% interest rate ($560k). the property still throws off $800k in NOI but has a $560k debt
payment. This leaves $240k, however, she only invested $2.0M in cash because of the 80% loan. This equates
to a leveraged return of 12.0% for the buyer ($240k / $2.0M = 12.0%). We see that because the borrowing rate
@jvenator
jvenator / gist:2008472
Created March 9, 2012 20:21
packages/documents_controller options
class Packages::DocumentsController < ApplicationController
def create
@package = Package.find(params[:package_id])
Document.where(:id => params[:id].split(",")).each do |d|
@package.add_document(d)
end
@documents = Document.where(:id => params[:id].split(",")).collect do |d|
@package.add_document(d)
end
def destroy
<section id="links" class = "link" align="center">
<div class="center">
<h2 class="title"><span>Coder Cred</span></h2>
</div>
<div class="coder-cred center">
<ul>
<li class="github"><a href="http://github.com/##"></a></li>
<li class="codeschool"><a href="http://www.codeschool.com/users/##" ></a></li>
<li class="coderwall"><a href="https://coderwall.com/##" ></a></li>
<li class="stackoverflow"><a href="http://stackoverflow.com/users/1496757/##" ></a></li>
h1 {
font-size: 3em;
}
div#right_col{
width: 212px;
}
div#right_col img {
border: 6px solid #403051;