Skip to content

Instantly share code, notes, and snippets.

import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';
const RECURRING_FREQUENCY_UNIT = {
2: "Hourly",
3: "Daily",
4: "Weekly",
5: "Monthly"
};
@chandlerkent
chandlerkent / components.my-component.js
Last active April 5, 2017 01:50
vertical-collection max height
import Ember from 'ember';
export default Ember.Component.extend({
number: -1
});
@chandlerkent
chandlerkent / controllers.application.js
Created May 13, 2016 20:49
ember-parent-child-select-promise
import Ember from 'ember';
const ObjectPromiseProxy = Ember.ObjectProxy.extend(Ember.PromiseProxyMixin);
export default Ember.Controller.extend({
storeInventoryItems: Ember.inject.service(),
appName: 'Ember Twiddle',
stores: [
{id: 1, displayName: 'rob'},
{id: 2, displayName:'chandler'}
function(doc) {
if (doc.type === "game") {
var new_seats = [];
var seats = doc.seats;
for (var i = 0; i < seats.length; i++) {
if (parseInt(seats[i].price, 10) < 50) {
new_seats.push(seats[i]);
}
}
doc.seats = new_seats;
var express = require("express");
var WEBROOT = path.join(path.dirname(__filename), "../client");
var app = express.createServer();
app.listen(3333);
var publicServer = express.static(path.join(WEBROOT + "/public"));
app.configure(function() {
app.use(express.logger({
@import <Foundation/CPObject.j>
@import <Foundation/CPNotificationCenter.j>
@import <Foundation/CPURL.j>
@import <AppKit/CPToolbar.j>
@import <AppKit/CPCursor.j>
@import "CKToolbarDelegate.j"
@import "CKGitHubController.j"
@import "CKGistController.j"
@import "CKMainView.j"
/*
* AppController.j
* NewApplication
*
* Created by You on February 22, 2011.
* Copyright 2011, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
/*
* CPNavigationBar.j
* AppKit
*
* Created by Nicholas Small.
* Copyright 2009, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@chandlerkent
chandlerkent / AppController.j
Created February 23, 2010 02:07
"Shadowed" should be alerted.
/*
* AppController.j
* ShadowingProblem
*
* Created by Chandler Kent on February 22, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
/*
* CPUserDefaults.j
* AppKit
*
* Created by Nicholas Small.
* Copyright 2009, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either