Skip to content

Instantly share code, notes, and snippets.

@afshin
afshin / README.md
Created July 11, 2023 11:11 — forked from jtpio/README.md
JupyterLab 4.0.1 n Binder

JupyterLab 4 on Binder

Binder

@afshin
afshin / README.md
Last active September 15, 2021 15:52 — forked from jtpio/README.md
JupyterLab 3.1.12

JupyterLab 3.1.12 on Binder

Binder

Features

  • Real Time Collaboration enabled

rtc-demo

This is just a gist.
@afshin
afshin / main.go
Last active April 11, 2016 06:49
gyre leave test
package main
import (
"flag"
"fmt"
"github.com/zeromq/gyre"
"os"
"time"
)
@afshin
afshin / menu.ts
Last active January 26, 2016 14:36
menus
/**
* Defines a section within a menu
*/
interface IMenuSection {
id: string;
items: IMenuItem[];
}
/**
* Base for menu items, not to be used by itself.

Keybase proof

I hereby claim:

  • I am afshin on github.
  • I am darian (https://keybase.io/darian) on keybase.
  • I have a public key whose fingerprint is 62C6 231F F6A4 31F8 57B9 29B6 4B0E 7F36 237A CAFC

To claim this, I am signing this object:

@afshin
afshin / partial-application-post-5.js
Created March 13, 2012 18:12
Partial Application in JavaScript Revisited 5
(function () {
var delay = setTimeout.partial(undefined, 10);
delay(function () {
console.log('A call to this function will be temporarily delayed.');
});
// logs 'A call to this function will be temporarily delayed.'
delay(function () {console.log('Some other message.');});
// logs 'Some other message.'
})();
@afshin
afshin / partial-application-post-3.js
Created March 13, 2012 17:50
Partial Application in JavaScript Revisited 3
(function () {
var delay = setTimeout.partial(undefined, 10);
delay(function () {
console.log('A call to this function will be temporarily delayed.');
});
// logs 'A call to this function will be temporarily delayed.'
delay(function () {console.log('Some other message.');});
// logs 'A call to this function will be temporarily delayed.'
})();
@afshin
afshin / partial-application-post-2.js
Created March 13, 2012 17:40
Partial Application in JavaScript Revisited 2
(function () {
var delay = setTimeout.partial(undefined, 10);
delay(function () {
console.log('A call to this function will be temporarily delayed.');
});
// logs 'A call to this function will be temporarily delayed.'
})();
@afshin
afshin / partial-application-post-1.js
Created March 13, 2012 17:27
Partial Application in JavaScript Revisited 1
Function.prototype.partial = function () {
var fn = this, args = Array.prototype.slice.call(arguments);
return function () {
var arg = 0;
for (var i = 0; i < args.length && arg < arguments.length; i++)
if (args[i] === undefined)
args[i] = arguments[arg++];
return fn.apply(this, args);
};
};