This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my.Array2.prototype.cosFit = function(yy) {};: | |
return yy._cosFitFft(this); | |
## OPTIMIZATION - cache callback | |
my.Array2.prototype._cosFitFft = function(cff) {};: | |
{{my.Array2.rgxEach1.1}}, amp, awp, cc, dy, ii3, jj, ll3, mm, nn, scale, ss, stride3, yy2; | |
{{my.Array2.rgxEach1.2}} | |
awp = [null, null, null]; | |
for(mm = 0; (1 << mm) < ll2; mm += 1) {;} nn = 1 << mm; | |
scale = (nn + 0.5) / this.ll2; yy2 = new window.Float64Array(nn); | |
{{my.Array2.rgxEach1.3}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my.httpGet = function(kwargs) {};: | |
var data, ll, ll2, rsp, tmp; ll = ll2 = 0; | |
if(typeof kwargs === 'string') {kwargs = {'hpath': kwargs};} | |
my.xhrInit(kwargs); | |
if(kwargs.proxy) {kwargs.hpath = kwargs.proxy + '/' + kwargs.hpath;} | |
my.ooUpdateUndefined();: | |
my.ooUpdateUndefined(kwargs, my.urlParse(kwargs.hpath)), | |
{}: | |
'client': rqd[(kwargs.protocol).slice(0, -1)], | |
'fncData': function(chunk) {},: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my.rgxCount = function(ss, rgx) { | |
var ll = 0; my.rgxEach(ss, rgx, function() {ll += 1;}); return ll; | |
}; | |
my.rgxEach = function(ss, rgx, fnc) { | |
var fnd, ii; if(!rgx.global) {return;} ii = 0; | |
while(true) {fnd = rgx.exec(ss); if(!fnd || fnc(fnd,ii) === false) {return;} ii += 1;} | |
}; | |
my.rgxEscape = function(ss, flag) { | |
return new RegExp(ss.replace(/([$\\(*+.?\[\^{|])/g, '\\$1'), flag); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## chroot | |
$ wget http://ftp.us.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.10lenny1_all.deb | |
$ ar x debootstrap_1.0.10lenny1_all.deb | |
$ tar xzf data.tar.gz -C / | |
$ mkdir /debian | |
$ debootstrap --arch i386 unstable /debian/ http://ftp.us.debian.org/debian/ | |
$ cp /etc/hosts /debian/etc/hosts | |
$ mount /debian/dev/pts | |
$ mount /debian/dev/shm | |
$ mount /debian/proc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my.xhrUpload = function(kwargs) { | |
kwargs.method = kwargs.method || 'POST'; | |
my.xhrInit(kwargs, null, {'uploadFileInfo': kwargs.fpp}); | |
kwargs.postData = | |
kwargs.postData || (kwargs.fpp.mozSlice || kwargs.fpp.webkitSlice).call(kwargs.fpp); | |
return my.xhrGet(kwargs); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint indent: 2, nomen: true, regexp: true, stupid: true*/ | |
(function () { | |
'use strict'; | |
var circularObject, exports = {}; | |
exports.jsStringifyCircular = function (oo, arr) { | |
//// stringify circular objects | |
var ii, kk, out, vv; | |
arr = arr || []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint bitwise: true, indent: 2, nomen: true, regexp: true, stupid: true*/ | |
(function () { | |
'use strict'; | |
var exports = {}; | |
exports.uuid4 = function () { | |
//// return uuid of form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx | |
var uuid = '', ii; | |
for (ii = 0; ii < 32; ii += 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint bitwise: true, indent: 2, nomen: true, regexp: true, stupid: true*/ | |
(function () { | |
'use strict'; | |
exports.requireFs = require('fs'); | |
function FsRemoveR() { | |
} | |
FsRemoveR.prototype.callbackDefault = function (err) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint bitwise: true, indent: 2, nomen: true, regexp: true, stupid: true*/ | |
(function () { | |
'use strict'; | |
exports.requireFs = require('fs'); | |
exports.requirePath = require('path'); | |
function _fsMkdirP(dirname, callback) { | |
exports.requireFs.mkdir(dirname, function (err) { | |
switch (err && err.code) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint bitwise: true, indent: 2, nomen: true, regexp: true, stupid: true*/ | |
(function () { | |
'use strict'; | |
exports.requireHttp = require('http'); | |
exports.requireUrl = require('url'); | |
exports.handlerHttpProxy = function (request, response, next) { | |
var kk, | |
proxy = exports.requireUrl.parse(/http.*/.exec(request.url)[0]); |