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
@blakmatrix
blakmatrix / gist:3519790
Created August 29, 2012 22:37
custom http-server bin
#!/usr/bin/env node
var colors = require('colors'),
httpServer = require('../lib/http-server';
var port = 8080,
host = '0.0.0.0',
log = console.log;
info: git://github.com/frnksgr/27bslash6-module.git Has already been processed!
info: git://github.com/biggora/2co.git Has already been processed!
info: git://github.com/csvplot/2csv.git Has already been processed!
info: git://github.com/3scale/3scale_ws_api_for_nodejs.git Has already been processed!
info: git://github.com/jolira/node-404project.git Has already been processed!
info: git://github.com/meritt/node-4sq.git Has already been processed!
info: git://github.com/ro-ka/node-500px.git Has already been processed!
info: git://github.com/raoulmillais/node-7digital-api.git Has already been processed!
info: git://github.com/grahamlyons/A.git Has already been processed!
info: git://github.com/JamesEggers1/node-ABAValidator.git Has already been processed!
app.commands.file = function file (filename, cb) {
this.log.info('Attempting to open "' + filename +'"');
var newFile = getNewFile( filename ,cb);
app.log.info("Changes are comming!:\n"+newFile);
cb(null);
};
var getNewFile = function(filename, cb){
fs.readFile(filename, function (err, data) {
if (err) cb( err);
Hello <USER>!
I am migrationBot, an open-source bot, and I'm here to help you migrate your codebase to node v0.8!
Did you know that the "sys" module throws an error if your program tries to require it in node v0.8? To help keep your code running, I automatically replaced var sys = require('sys') with var util = require('util').
If you'd like to know more about these changes in node.js, take a look at https://github.com/joyent/node/commit/1582cf#L1R51 and https://github.com/joyent/node/blob/1582cfebd6719b2d2373547994b3dca5c8c569c0/ChangeLog#L51 .
Enjoy!
Your Friendly Neighborhood migrationBot
**/
const int c = 261;
const int d = 294;
const int e = 329;
const int f = 349;
const int g = 391;
const int gS = 415;
const int a = 440;
const int aS = 455;
@blakmatrix
blakmatrix / node0.10.0.ps1
Last active December 15, 2015 05:29
jitsu @ 0.12.8
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS C:\Users\fred rosak> cd c:/jitsu
PS C:\jitsu> node -v
v0.10.0
PS C:\jitsu> npm -v
1.2.14
PS C:\jitsu> npm test
$ jitsu [10:53:28]
info: Welcome to Nodejitsu blakmatrix
info: jitsu v0.12.3, node v0.10.0
info: It worked if it ends with Nodejitsu ok
info: Executing command
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
var http = require('http'),
repl = require('repl'),
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');
repl.start({
prompt: 'curl repl> '
~/test/node-sass]# node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@0.8.4
gyp info using node@0.8.19 | sunos | x64
gyp http GET http://nodejs.org/dist/v0.8.19/node-v0.8.19.tar.gz
gyp http 200 http://nodejs.org/dist/v0.8.19/node-v0.8.19.tar.gz
gyp info spawn python
gyp info spawn args [ '/opt/local/lib/node_modules/node-gyp/gyp/gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
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);