Skip to content

Instantly share code, notes, and snippets.

@ericrius1
ericrius1 / gist:5801619
Created June 18, 2013 00:06
debug nodejitsu
ericlevin@erics-MacBook-Pro:~/CollaboArt $ jitsu deploy --debug
info: Welcome to Nodejitsu ericrius1
info: jitsu v0.12.11, node v0.10.5
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node app.js
debug: { method: 'GET',
debug: uri: 'https://api.nodejitsu.com/apps/ericrius1/CollaboArt',
debug: headers:
debug: { Authorization: '*********************************************************************',
@ericrius1
ericrius1 / gist:5802454
Created June 18, 2013 03:17
express boiler
var express = require('express');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io').listen(server);
io.set('log level', 1);
server.listen(8081);
console.log("listening on 8081")
var fib = (function(){
var cache = [0, 1, 1];
return function(n){
if(cache[n] === undefined){
cache[n] = fib(n-1) + fib(n-2);
}
return cache[n];
}
})()
info: Creating snapshot 1.0.0-2
info Uploading: [=============================] 100%
info: Updating app mean
info: Activating snapshot 1.0.0-2 for mean
info: Starting app mean
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: Application crashed with the following output:
error:
info: Welcome to Nodejitsu ericrius1
info: jitsu v0.13.2, node v0.10.17
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in NODE_ENV=production ./node_modules/.bin/nodemon server.js
debug: { method: 'GET',
debug: uri: 'https://api.nodejitsu.com/apps/ericrius1/mean',
debug: headers:
debug: { Authorization: '*********************************************************************',
debug: 'Content-Type': 'application/json' },
var path = require('path')
, rootPath = path.normalize(__dirname + '/..')
, templatePath = path.normalize(__dirname + '/../app/mailer/templates')
, notifier = {
APN: false,
email: false, // true
actions: ['comment'],
tplPath: templatePath,
postmarkKey: 'POSTMARK_KEY',
#Chrome DevTools Tips I wish I had known when I began my journey as a web developer
<br>
Learning how to use the Google Chrome dev tools marked the inflection point in my journey towards becoming a web developer. When I started learning web development, I had heard vague rumblings of these tools, but didn't put in too much time researching them, as I believed it was more important to first learn the "basics." What is the DOM? How does it relate to HTML? How does CSS style an HTML element? And how does Javascript fit into all of this? I regret to report that I spent a lot of time reading through w3schools articles.
I don't think it's an exaggeration to say that if I had just dove right in and started learning and playing with the dev tools, I would have learned so much more about all of these topics, and in a much more powerful, experiential way to boot.
The dev tools don't just *tell* you how the DOM works, they *show* you.
For today's post, I'd like to walk you through some of the tips I learned after
@ericrius1
ericrius1 / An-Anonymous-Pen.markdown
Created February 6, 2014 01:34
A Pen by A Non Ymous.
(function() {
this.entityID = null;
this.clickReleaseOnEntity = function(entityID, mouseEvent) {
this.entityID = entityID;
print('CLICK ON ENEITYT PRITNRNRNRNRNRNRN')
};
})
(function(){
this.defaultMaxRange = 5;
this.acceleration = {x: 0, y: 0, z: 0};
this.onColor = {red: 10, green: 200, blue: 10};
this.offColor = {red: 200, green: 0, blue: 0};
var self = this;
//Default forward direction of mover object
this.forward = {x: 0, y: 0, z: -1};
this.isMoving = false;
this.velocity = {x: 0, y: 0, z: 0};