Skip to content

Instantly share code, notes, and snippets.

View joemccann's full-sized avatar
💭
Thinking

Joe McCann joemccann

💭
Thinking
View GitHub Profile
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error: There was an error while attempting to deploy the app
error:
error: package.json error: can't find starting script: node app
error: Package.json start script declared but not found
error:
error: This type of error is usually a user error.
error: Error output from Haibu:
error:
@joemccann
joemccann / ocr.js
Created January 20, 2013 00:50
Optical Character Recognition with node.js and Tesseract. Check your console for the results...
var ncr = require('nodecr')
, request = require('request')
, fs = require('fs')
, test_img = 'https://www.google.com/images/srpr/logo3w.png' // Change this to your image
// Create image name from end of URL.
// Note this will fail in loads of cases.
var imgName = test_img.split('/').pop()
// Process the image and read the text from it using Tesseract
info: Creating snapshot 0.3.1-9
info Uploading: [=============================] 100%
info: Updating app Dillinger
info: Activating snapshot 0.3.1-9 for Dillinger
info: Starting app Dillinger
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error:
error: There was an error while attempting to start the app
error: Error spawning drone
@joemccann
joemccann / log.sh
Created October 5, 2012 13:10
jitsu deploy error
λ ~work/dillinger/ master* jitsu apps start Dillinger
info: Welcome to Nodejitsu joemccann
info: It worked if it ends with Nodejitsu ok
info: Executing command apps start Dillinger
info: Starting app Dillinger
error: Error running command apps start Dillinger
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: socket hang up
error: at createHangUpError (http.js:1263:15)
@joemccann
joemccann / pipe-to-twitter.js
Created August 29, 2012 14:11
node twitter oauth hell.
// This is in the same file in my node app, but split so you can see what is being used where
pipeToTwitter: function(echo, req, res){
// TODO: Not sure if this check goes here or in pipePhotoToTwiter() in twitter.js plugin
if(!req.session.twitter.oauth){
res.type('text/plain')
return res.status(403).send("You are not authenticated with Facebook.")
}
// TODO: EVENTUALLY WE WILL NEED TO CHECK THE
@joemccann
joemccann / fuckingoauth.js
Created August 28, 2012 17:11
fucking_oauth.js
// TODO: Not sure if this check goes here or in pipePhotoToTwiter() in twitter.js plugin
if(!req.session.twitter.oauth){
res.type('text/plain')
return res.status(403).send("You are not authenticated with Facebook.")
}
// TODO: EVENTUALLY WE WILL NEED TO CHECK THE
// https://api.twitter.com/1/help/configuration.json
// RESPONSE THAT CONTAINS SHORT URL CHARS AND MAX MEDIA UPLOADS
// SEE https://dev.twitter.com/docs/api/1/get/help/configuration
@joemccann
joemccann / jitsu.sh
Created August 26, 2012 06:45
jitsu deploy error
λ ~work/photopipe/ master* jitsu deploy
info: Welcome to Nodejitsu joemccann
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in node app.js
warn: Local version appears to be old
warn: Your package.json version will be incremented for you automatically
warn: About to write /Users/joemccann/Documents/workspace/photopipe/package.json
warn: Using '*' as version for dependencies may eventually cause issues.
warn: Please use specific versions for dependencies to avoid future problems.
@joemccann
joemccann / error.sh
Created August 18, 2012 23:33
jitsu deploy error
info: Creating snapshot 0.0.1-11
info: Updating app photopipe
info: Activating snapshot 0.0.1-11 for photopipe
info: Starting app photopipe
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error: There was an error while attempting to deploy your application.
error:
error: NPM Install failed
error: NPM failed to install dependencies
@joemccann
joemccann / coredump.txt
Created July 11, 2012 22:41
coredump 1 -- ATT
attwifinder:~# gdb node core.31195
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
@joemccann
joemccann / perl-fix.sh
Created July 8, 2012 18:25
Fixing the Stupid Perl Issues on Linux
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
apt-get install locales
dpkg-reconfigure locales