Skip to content

Instantly share code, notes, and snippets.

/** Requires **/
var ContainerSurface = require('../famous/surfaces/ContainerSurface');
var StateModifier = require('../famous/modifiers/StateModifier');
var _ = require('underscore');
var extend = require('node.extend');
var generateRadioButton = require('./generateRadioButton');
var generateBebopRatio = require('./generateBebopRatio');
var processRadioButton = require('./processRadioButton');
var defaultSurfaceOptions = {
1. Create an emitter object
var emitter = require('emitter').EventEmitter;
engine.on('resize', function () {
emitter.emit('resize');
})
@cj3kim
cj3kim / gist:11230574
Created April 23, 2014 20:11
ScrollContainer bug?
function ScrollContainer(options) {
this.options = Object.create(ScrollContainer.DEFAULT_OPTIONS);
this._optionsManager = new OptionsManager(this.options);
if (options) this.setOptions(options);
this.container = new ContainerSurface(this.options.container);
this.scrollview = new Scrollview(this.options.scrollview);
this.surface.add(this.scrollview);
require("./famous-polyfills/index");
require('domready')(function () {
var Engine = require('./famous/core/Engine');
var InputSurface = require('./famous/surfaces/InputSurface');
var StateModifier = require('./famous/modifiers/StateModifier');
var ContainerSurface = require('./famous/surfaces/ContainerSurface');
var Scrollview = require('./famous/views/Scrollview');
jitsu deploy --debug
info: Welcome to Nodejitsu cj3kim
info: jitsu v0.13.15, node v0.10.25
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in npm ls && node server.js
debug: { method: 'GET',
debug: uri: 'https://api.nodejitsu.com/apps/cj3kim/med-chat',
debug: headers:
debug: { Authorization: '*****************************************************************',
info: Welcome to Nodejitsu cj3kim
info: jitsu v0.13.15, node v0.10.25
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in npm ls && node server.js
debug: { method: 'GET',
debug: uri: 'https://api.nodejitsu.com/apps/cj3kim/med-chat',
debug: headers:
debug: { Authorization: '*****************************************************************',
debug: 'Content-Type': 'application/json',
info: Updating app med-chat
info: Activating snapshot 0.0.1-3 for med-chat
info: Starting app med-chat
error: Error running command deploy
error: Errors occured while starting the application
error: Error output from application. This is usually a user error.
error:
error: module.js:340
error: throw err;
error: ^
@cj3kim
cj3kim / gist:9901290
Created March 31, 2014 20:18
Undetailed Error Report
info: Creating snapshot 0.0.1-1
info: Uploading: [=============================] 100%
error: Error running command deploy
error: Error building snapshot
error: Nodejitsu Error (500): Internal Server Error
help: For help with this error contact Nodejitsu Support:
help: webchat: <http://webchat.nodejitsu.com/>
help: irc: <irc://chat.freenode.net/#nodejitsu>
help: email: <support@nodejitsu.com>
help:
while(queue.waitForMessage()){
queue.processNextMessage();
}
@cj3kim
cj3kim / gist:4142737
Created November 25, 2012 07:31
riak reduce function
function(values) {
var str = "";
for(var val in values) {
if (val.constructor == Object) {
for (var key in val) {
str += val[key];
}
} else {
str += val;
}