Skip to content

Instantly share code, notes, and snippets.

View blakmatrix's full-sized avatar
🧿
You may be gone tomorrow, but that doesn't mean that you weren't here today.

❤️ Farrin Reid blakmatrix

🧿
You may be gone tomorrow, but that doesn't mean that you weren't here today.
View GitHub Profile
var http = require('http');
var buf0 = new Buffer([0]);
var server = http.createServer(function (req, res) {
res.setHeader('content-type', 'multipart/octet-stream');
res.write('Welcome to the Fun House\r\n');
res.write('> ');
req.on('data', function (buf) {
res.write(buf);
info: GET / 403 2ms - 9
app=Tabrific-Public, user=tabrific, event=drone:stdout
error: Error: Forbidden
at SendStream.error (/opt/haibu/apps/tabrific/Tabrific-Public/package/node_modules/express/node_modules/send/lib/send.js:145:16)
at SendStream.pipe (/opt/haibu/apps/tabrific/Tabrific-Public/package/node_modules/express/node_modules/send/lib/send.js:307:39)
at ServerResponse.res.sendfile (/opt/haibu/apps/tabrific/Tabrific-Public/package/node_modules/express/lib/response.js:339:8)
at exports.index (/opt/haibu/apps/tabrific/Tabrific-Public/package/routes/index.js:7:7)
at callbacks (/opt/haibu/apps/tabrific/Tabrific-Public/package/node_modules/express/lib/router/index.js:161:37)
at param (/opt/haibu/apps/tabrific/Tabrific-Public/package/node_modules/express/lib/router/index.js:135:11)
at pass (/opt/haibu/apps/tabrific/Tabrific-Public/package/node_modules/express/lib/router/index.js:142:5)
var fs = require("fs");
function main() {
fs.readdir("./node_modules", function (err, dirs) {
if (err) {
console.log(err);
return;
}
dirs.forEach(function(dir){
if (dir.indexOf(".") !== 0) {
{
"name": "meteor-leaderboard",
"author": "Farrin",
"description": "test",
"version": "0.0.2-12",
"engines": {
"node": "0.8.x"
},
"dependencies": {
"fibers": "1.0.x",
$ jitsu deploy -c [18:14:50]
info: Welcome to Nodejitsu blakmatrix
info: jitsu v0.12.0, node v0.8.19
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Skipping require-analyzer because noanalyze option is set
info: Skipping require-analyzer because noanalyze option is set
warn: Local package version appears to be old
warn: The package.json version will be incremented automatically
warn: About to write /Users/blakmatrix/projects/test/vm/package.json
@blakmatrix
blakmatrix / gist:4956455
Last active December 13, 2015 18:38
get last 100 lines from logs nodejitsu
curl -X POST -H "Content-Type: application/json" \
https://api.nodejitsu.com/logs/<username>/<appname> \
-d '{"from":"NOW-1DAY","until":"NOW","rows":100}' \
-u <username>:<password/token> | node -e \
"process.stdin.resume();
process.stdin.setEncoding('utf8');
var str = '';
process.stdin.on('data', function (chunk) {str += chunk.toString();});
process.stdin.on('end', function () {
JSON.parse(str).data.forEach(function(i){process.stdout.write(i.json.message);});});"
blakmatrix@redmorpheus: ~/projects/nodejitsu-custom-ssl master ⚡
$ sudo npm remove jitsu -g [14:08:16]
Password:
blakmatrix@redmorpheus: ~/projects/nodejitsu-custom-ssl master ⚡
$ npm cache clear [14:10:32]
blakmatrix@redmorpheus: ~/projects/nodejitsu-custom-ssl master ⚡
$ sudo npm -g install flatiron [14:10:53]
npm http GET https://registry.npmjs.org/flatiron
blakmatrix@redmorpheus: ~/projects/nodejitsu-custom-ssl master ⚡
$ sudo npm i jitsu -g [13:52:58]
npm http GET https://registry.npmjs.org/jitsu
npm http 200 https://registry.npmjs.org/jitsu
npm http GET https://registry.npmjs.org/jitsu/-/jitsu-0.12.0.tgz
npm http 200 https://registry.npmjs.org/jitsu/-/jitsu-0.12.0.tgz
npm http GET https://registry.npmjs.org/colors/0.6.0-1
npm http GET https://registry.npmjs.org/complete/0.3.1
npm http GET https://registry.npmjs.org/dateformat/1.0.2-1.2.3
npm http GET https://registry.npmjs.org/flatiron/0.3.3
var http = require('http');
var fs = require('fs');
var util = require('util');
var path = require('path');
var request = require('request');
var externalIPs = [];
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'application/json'});
@blakmatrix
blakmatrix / mongo.js
Created January 31, 2013 22:48
HOW TO USE MONGO ON NODEJITSU AND AUTHENTICATE AT THE SAME TIME!
help: Connect with the `mongo` cli client:
help:
$ mongo linus.mongohq.com:10024/nodejitsudb1789005964 -u nodejitsu -p 026fb184f5d95f658fc147e54d560300
help:
help: Connect with the `mongodb-native module`:
help:
var mongodb = require('mongodb');
var db = new mongodb.Db('nodejitsudb1789005964',
new mongodb.Server('linus.mongohq.com', 10024, {})
);