Skip to content

Instantly share code, notes, and snippets.

Debjit Biswas debjitbis08

Block or report user

Report or block debjitbis08

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View install-dots.sh
git clone --bare hhttps://github.com/debjitbis08/dots.git $HOME/.cfg
function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .config-backup
config checkout
if [ $? = 0 ]; then
echo "Checked out config.";
else
echo "Backing up pre-existing dot files.";
View keybase.md

Keybase proof

I hereby claim:

  • I am debjitbis08 on github.
  • I am debjit (https://keybase.io/debjit) on keybase.
  • I have a public key whose fingerprint is 1909 219C 8A55 FF66 4752 9B43 F6EE BC7A 5E0F 6184

To claim this, I am signing this object:

View doubleEveryOther.js
var zipWith = function (fn, a, b) {
var l = Math.min(a.length, b.length),
r = [];
for(var i = 0; i < l; i += 1) {
r.push(fn(a[i], b[i]));
}
return r;
};
var mul = function (a, b) { return a * b; }
View arrow.js
function AsyncA(cps) {
this.cps = cps;
}
AsyncA.prototype.AsyncA = function () {
return this;
};
AsyncA.prototype.next = function (g) {
var f = this;
g = g.AsyncA();
@debjitbis08
debjitbis08 / rng.js
Last active Dec 15, 2015
Portable random number generator recommended in Seminumerical Algorithms. Ported from http://www-cs-faculty.stanford.edu/~uno/programs/rng-double.c
View rng.js
(function () {
var KK = 100;
var LL = 37;
var mod_sum = function (x, y) {
return x+y-(x+y|0);
};
var ran_u = Array(KK);
@debjitbis08
debjitbis08 / 8085.pegjs
Last active Dec 14, 2015
PEG.js file for the 8080/8085 assembly language
View 8085.pegjs
{
var machineCode = [];
var symbolTable = {};
var ilc = 0;
var mnemonics = {
"nop" : {code:0x00,size:1},
"lxi b,d16" : {code:0x01,size:3},
"stax b" : {code:0x02,size:1},
"inx b" : {code:0x03,size:1},
"inr b" : {code:0x04,size:1},
@debjitbis08
debjitbis08 / bindReady.js
Created Sep 25, 2012
Bind Ready function based on jQuery 1.8.2 code.
View bindReady.js
var bindReady = function (d) {
function callback() {
if (this.isReady) {
return;
}
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
if ( !document.body ) {
return setTimeout( callback, 1 );
}
You can’t perform that action at this time.