Skip to content

Instantly share code, notes, and snippets.

View controllers.application\.js
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 Apr 5, 2017
vertical-collection max height
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
number: -1
});
@chandlerkent
chandlerkent / controllers.application.js
Created May 13, 2016
ember-parent-child-select-promise
View controllers.application.js
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'}
View map.js
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;
View server.js
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({
View AppController.j
@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"
View AppController.j
/*
* AppController.j
* NewApplication
*
* Created by You on February 22, 2011.
* Copyright 2011, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
View CPNavigationBar.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 Feb 23, 2010
"Shadowed" should be alerted.
View AppController.j
/*
* AppController.j
* ShadowingProblem
*
* Created by Chandler Kent on February 22, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
View CPUserDefaults.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