Skip to content

Instantly share code, notes, and snippets.

View bmatusiak's full-sized avatar
👌
Having Fun

Bradley Matusiak bmatusiak

👌
Having Fun
View GitHub Profile
@bmatusiak
bmatusiak / git.js
Created November 24, 2012 19:29
Git CLI to NodeJS
var procman = require("./procman.js");
module.exports = function(uri){
return new git(uri);
};
function git(uri){
this.uri(uri);
this.RunOptions = {};
}
@bmatusiak
bmatusiak / inline.js
Created November 24, 2012 21:45
inline async js
module.exports = function inline(functions){
/*
,function(next,done){
//
next();
}
*/
functions.reverse();
return function(done) {
@bmatusiak
bmatusiak / README.md
Created November 26, 2012 01:41
How to Check to see if your project running in cloud9

OK.. This is a quick and dirty how to check if your project in running in the c9.io ...

When you have c9.io's IDE open and you go to terminal.

type echo $C9_PID .

If you notice it shoots our a number. This is your project id that c9 uses for there internal id system

This env var is global to every nodejs app that gets ran from ide.

@bmatusiak
bmatusiak / re.js
Created December 3, 2012 23:52
remove space new lines and tabs
replace(/(\r\n|\n|\r|\t| + )/gm,"")
// History.js It!
// v1.0.1 - 30 September, 2012
// https://gist.github.com/854622
(function(window,undefined){
// Prepare our Variables
var
History = window.History,
$ = window.jQuery,
document = window.document;
var _privAlien = {
x: null
};
var alien = {
get x() {
return function (x) {
if (!x) return _privAlien.x;
else _privAlien.x = x;
};
@bmatusiak
bmatusiak / 0 - top .md
Last active December 15, 2015 16:59
cloud9 Image Processing
/**
* Compatibility layer for Webkit based browsers.
* @private
*/
apf.runWebkit = function(){
if (XMLHttpRequest.prototype.sendAsBinary === undefined) {
if (window.ArrayBuffer) {
@bmatusiak
bmatusiak / what it needs to be.js
Last active December 16, 2015 05:19
Uncaught TypeError: undefined is not a function apf_release.js:15360
this.$createNode = function(doc, nodeType, xmlNode, namespaceURI, nodeName, nodeValue){
var o;
switch (nodeType) {
case 1:
var id, prefix;
if (xmlNode) {
if ((namespaceURI = xmlNode.namespaceURI || apf.ns.xhtml)
&& !(prefix = doc.$prefixes[namespaceURI])) {
doc.$prefixes[prefix = xmlNode.prefix || xmlNode.scopeName || ""] = namespaceURI;
<html>
<head>
</head>
<body>
<script>
var gui = require('nw.gui');
var win;
var spawn = require('child_process').spawn;
var c9Proc = spawn('node', ['cloud9/server.js','-w', process.env.HOME]);