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:2842259
Created May 31, 2012 09:38
nodejitsu HTTPS test
Bad:
blakmatrix:blakmatrix_http_https_test/ $ curl -k https://blakmatrix-test-http-https.jitsu.com:80 -v [2:27:03]
* About to connect() to blakmatrix-test-http-https.jitsu.com port 80 (#0)
* Trying 108.166.87.26... connected
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to blakmatrix-test-http-https.jitsu.com:80
@blakmatrix
blakmatrix / gist:2932720
Created June 14, 2012 20:23
jitsu deploy hanging on creating snapshot every once in a while
blakmatrix:http-server/ $ jitsu deploy [13:12:43]
info: Welcome to Nodejitsu blakmatrix
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
info: Creating snapshot 0.0.4
^C
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);
PS C:\Users\fred rosak\Documents\GitHub\node-migrator-bot> node .\app.js repo "C:\Users\fred rosak\Documents\GitHub\node-backplane"
info: Attempting to open path"C:\Users\fred rosak\Documents\GitHub\node-backplane"
info: C:\Users\fred rosak\Documents\GitHub\node-backplane is a folder
debug: No require('sys') text found in C:\Users\fred rosak\Documents\GitHub\node-backplane\.gitignore, no modifications made.
info: node-migrator-bot ok
debug: No require('sys') text found in C:\Users\fred rosak\Documents\GitHub\node-backplane\cucumber.yml, no modifications made.
info: node-migrator-bot ok
debug: No require('sys') text found in C:\Users\fred rosak\Documents\GitHub\node-backplane\ciConfig.yml, no modifications made.
info: node-migrator-bot ok
debug: No require('sys') text found in C:\Users\fred rosak\Documents\GitHub\node-backplane\LICENSE, no modifications made.
PS C:\Users\fred rosak\projects\vows> vows -i --spec -v
vows bin argv []
vows bin options {
matcher: /.*/,
reporter: 'dot-matrix'
}
vows bin discovering folder structure
vows bin discovered ./test
vows runner loading [
'C:\\Users\\fred rosak\\projects\\vows\\test\\assert-test',
[blakmatrix@li225-26]31 node-migrator-bot:\> cd tmp/eugeniy/opentk-phantom/
[blakmatrix@li225-26]32 opentk-phantom:\> git status
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to track)
[blakmatrix@li225-26]33 opentk-phantom:\> git branch
[blakmatrix@li225-26]34 opentk-phantom:\> git clone https://github.com/node-migrator-bot/opentk-phantom
Initialized empty Git repository in /home/blakmatrix/projects/node-migrator-bot/tmp/eugeniy/opentk-phantom/opentk-phantom/.git/
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
@blakmatrix
blakmatrix / blog_farrin_migratorbot.md
Created June 22, 2012 17:15
Introducing blakmatrix and migratorBot

Introducing blakmatrix and migratorBot

Hi, my name is Farrin Reid. I love developing awesome software, tinkering with open source hardware, and trying out new hobbies. I am most intrigued by automation, strong AI, and all fields of science. I am excited to be working at Nodejitsu as one of the team.

I graduated from the University of Alaska Fairbanks in 2009. I stuck around for a few years and became a developer/programmer for the University of Alaska. About a year ago, I decided I wanted to move away; out of the cold, closer to family, and to expand my career horizon. I packed up 8 years of worth of collected belongings between my wife and I into our car and at 1:30pm June 18, 2011, I started my journey out of Fairbanks, AK to Seattle, WA.

I had a few interviews lined up when I arrived, but at the time the market was looking for senior developers. In the interim of looking for something to pay the bills, I got

var client = github.client({
username: username,
password: password
});
var endpoint = '/repos/' + username + '/' + repo;
client.del(endpoint, function (err, status, body) {
if (err) {
return cb(err);
}
@blakmatrix
blakmatrix / homer.js
Created June 22, 2012 20:15
bonsai logger
var util = require('util');
var Homer = module.exports = function (stream, format) {
var homer = this;
this.stream = stream;
this.format = format || function (lvl, msg) {
return util.format('[%s] %s', lvl, msg);
};