Skip to content

Instantly share code, notes, and snippets.

View install-dots.sh
sudo apt install fish
chsh -s `which fish`
sudo apt install git
git clone --bare https://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
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.