Skip to content

Instantly share code, notes, and snippets.

Avatar

Robo deepak1556

  • Microsoft
  • Redmond
View GitHub Profile
@deepak1556
deepak1556 / index.js
Created Mar 22, 2014
requirebin sketch
View index.js
var parse = require('css-parse');
var css = '/* this is a comment */';
console.log(JSON.stringify(parse(css), null, 2));
@deepak1556
deepak1556 / rkt-volume
Last active Aug 29, 2015
Rocket Volume Spec
View rkt-volume
App1.aci:
```
{
"mountPoints": [
{
"name": "A",
"path": "/app1/a"
},
{
"name": "B",
@deepak1556
deepak1556 / n.js
Created Dec 19, 2014
notimplemented
View n.js
var _slice = Array.prototype.slice;
function Maybe (fn) {
return function () {
return fn !== void 0 ? fn.apply(this, arguments) : 'Notimplemented'
}
}
function N (f) {
var name = f.name;
@deepak1556
deepak1556 / index.js
Created Feb 23, 2015
requirebin sketch
View index.js
var h = require('virtual-dom/h');
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/patch');
var createElement = require('virtual-dom/create-element');
var Delegator = require('dom-delegator')
var struct = require('observ-struct')
var observ = require('observ')
var raf = require('raf')
var state = struct({
@deepak1556
deepak1556 / expose_startdebug.patch
Created Apr 15, 2015
Exposing startdebug, use_debug_agent and debug_wait_connect
View expose_startdebug.patch
commit a90c4c4e8ec298823a5421bca96a102f78971515
Author: Robo <hop2deep@gmail.com>
Date: Tue Apr 14 07:47:25 2015 +0530
Exposing startdebug, use_debug_agent and debug_wait_connect
diff --git a/src/node.cc b/src/node.cc
index aa0af85..5f8dc07 100644
--- a/src/node.cc
+++ b/src/node.cc
@deepak1556
deepak1556 / module.patch
Created Apr 15, 2015
Remove system location for module lookups
View module.patch
commit 826f15a681380b1d074db2cdeed4c5d143c3a3da
Author: Robo <hop2deep@gmail.com>
Date: Thu Apr 16 00:08:56 2015 +0530
remove system location for module lookups
diff --git a/lib/module.js b/lib/module.js
index 79359da..c04778b 100644
--- a/lib/module.js
+++ b/lib/module.js
@deepak1556
deepak1556 / Js-->Lua
Created May 12, 2013
simple javascript methods such as pop(),splice(),indexOf(),instanceof(),extend(),apply() in lua
View Js-->Lua
function pop (arr)
local d = arr[table.getn(arr)]
table.remove(arr)
return d
end
function instanceof (obj1,obj2)
obj2 = tostring (obj2)
local mt = getmetatable (obj1)
@deepak1556
deepak1556 / jqueryUtil
Created Jun 15, 2013
some simple jquery functions
View jqueryUtil
$ = {
each : function(obj, callback) {
if ($.isArray(obj)) {
for(var i=0, j=obj.length; i<j ; i++) {
callback(i, obj[i]);
}
} else {
for(var k in obj) {
callback(k, obj[k]);
}
@deepak1556
deepak1556 / JSobj
Created Jun 15, 2013
some obj manipulation and validation functions
View JSobj
var objcopy = function(old) {
if (old === undefined) {
return undefined;
}
if (old === null) {
return null;
}
if (old.parentNode) {
return old;
@deepak1556
deepak1556 / arrayutils
Last active Dec 19, 2015
helper functions for manipulating arrays
View arrayutils
array.utils = (function() {
return {
arrayLoop: function(array, cb) {
for(var i = 0, j = array.length; i < j; i++) {
cb(array[i]);
}
},
arrayIndexof: function(array, item) {