Skip to content

Instantly share code, notes, and snippets.

def fetch_bundle(files):
'''
Aggregate the contents of several files into one string.
'''
try:
return ''.join([fetch(file) for file in files])
except IOError:
return fetch_bundle([os.path.join(files, f) for f in os.listdir(files)])
@photofroggy
photofroggy / ex.js
Created September 30, 2012 23:34 — forked from anonymous/gist:3808735
// Make your card constructor again here, but make sure to use private
// variables!
function Card(s, n) {
var suit = s;
var number = n;
this.getSuit = function() {
return suit;
};
this.getNumber = function() {
return number;
page.item('Form', {
'ref': 'myform',
'title': 'Test Form',
'hint': 'This is just an example of a form thingy',
'text': 'Some kind of form here. Just add a few simple\
elements and suchlike. Maybe I could make this\
API make more sense, or just be cleaner. Maybe\
make things more functional or OO.',
'fields': [
['Dropdown', {
var client = ChatClient;
var ui = UIManager;
ui.on('settings.open', function( e, ui ) {
page = e.settings.page('Main');
var orig = {};
orig.theme = replaceAll(client.ui.settings.theme, 'wsct_', '');
orig.clock = client.ui.clock();
info: Welcome to Nodejitsu photofroggy
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in server.js
warn: Local version appears to be old
warn: Your package.json version will be incremented for you automatically
warn: About to write /Users/Henry/Code/pond/package.json
warn: Using '*' as version for dependencies may eventually cause issues.
warn: Please use specific versions for dependencies to avoid future problems.
data:
var io = require('socket.io').listen(server);
info: Welcome to Nodejitsu photofroggy
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in server.js
info: Creating snapshot 0.0.6
info: Updating app pond
info: Activating snapshot 0.0.6 for pond
info: Starting app pond
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
function proxy( app ) {
var serve = http.createServer();
serve.listen(3900);
wsserve = new wss({
httpServer: serve,
autoAcceptConnections: false
});
{
"name": "pond",
"subdomain": "pond",
"scripts": {
"start": "server.js"
},
"version": "0.0.5",
"engines": {
"node": "0.6.x"
},
info: Welcome to Nodejitsu photofroggy
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in server.js
info: Creating snapshot 0.0.4
info: Updating app pond
info: Activating snapshot 0.0.4 for pond
info: Starting app pond
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error