Skip to content

Instantly share code, notes, and snippets.

View workmanw's full-sized avatar

Wesley Workman workmanw

View GitHub Profile
@workmanw
workmanw / binding_bug.js
Created July 1, 2011 15:26 — forked from tim-evans/binding_bug.js
Binding bug??
Tce.mainPage = SC.Page.design({
// The main pane is made visible on screen as soon as your app is loaded.
// Add childViews to this pane for views to display immediately on page
// load.
mainPane: SC.MainPane.design({
childViews: 'myCustomView'.w(),
myCustomView: SC.View.design({
childViews: ['checkbox'],
// ==========================================================================
// Project: Sample
// Copyright: @2011 My Company, Inc.
// ==========================================================================
/*globals Sample */
Sample = SC.Application.create({
store: SC.Store.create().from(SC.Record.fixtures)
});
@workmanw
workmanw / tasks.js
Created July 22, 2011 17:41 — forked from tritchey/tasks.js
filtering
ScaleUI.taskTagController = SC.ArrayController.create(
/** @scope ScaleUI.taskTagController.prototype */ {
queuedTasks: function() {
return content.filterProperty('state', TaskState.QUEUED);
}.property('@each.state').cacheable(),
runningTasks: function() {
return content.filterProperty('state', TaskState.RUNNING);
}.property('@each.state').cacheable(),
@workmanw
workmanw / followup.handlebars
Created November 30, 2011 17:02 — forked from lxcodes/followup.handlebars
Trouble With Sproutcore Template Views inside Core
<div>
Hello, <b>{{text}}</b>!
</div>
@workmanw
workmanw / gist:1419845
Created December 1, 2011 21:03 — forked from tim-evans/gist:1419818
hashFor & guidFor optimizations
diff --git a/frameworks/runtime/core.js b/frameworks/runtime/core.js
index 2d12957..4b553f4 100644
--- a/frameworks/runtime/core.js
+++ b/frameworks/runtime/core.js
@@ -316,8 +316,6 @@ SC.mixin(/** @scope window.SC.prototype */ {
guidKey: "SproutCore" + ( SC.VERSION + Math.random() ).replace( /\D/g, "" ),
// Used for guid generation...
- _guidPrefixes: {"number": "nu", "string": "st"},
- _guidCaches: {"number": {}, "string": {}},
var g = require('../garcon/lib/garçon');
var server = g.Server.create({proxyHost: 'localhost', proxyPort: 8080});
var myapp;
var shouldBuild = false;
var stdHtmlBody = [
 '<div id="loading">',
   '<p id="loading">',
   'Loading…',
var g = require('../garcon/lib/garçon');
var myapp;
var combineScripts = false;
//var shouldBuild = false;
//var stdHtmlBody = [
//'<div id="loading">',
//'<p id="loading">',
//'Loading…',
var B = {
foo: function (original) {
console.log("Foo B");
original();
}.enhance()
};
var C = {
foo: function () {
console.log("Foo C");
@workmanw
workmanw / pr.md
Created March 25, 2013 12:34 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});