Skip to content

Instantly share code, notes, and snippets.

Alexandre Morgaut AMorgaut

Block or report user

Report or block AMorgaut

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 object.create.js
// Object.create Partial Polyfill with minimum Support for second parameter
if (!Object.create) {
Object.create = function(o, props) {
function F() {}
F.prototype = o;
result = new F();
if (!props) return result;
for (var prop in props) {
if (!props.hasOwnProperty(prop)) continue;
result[prop] = props[prop].value;
AMorgaut / 0_reuse_code.js
Created Apr 3, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
AMorgaut / gist:8402379
Last active Jan 3, 2016
method hook on instanciated object
View gist:8402379
function sayHook = function () {
// do some stuff
// call original say() method
return Object.getPrototypeOf(this).say.apply(this,, 1));
obj.say = sayHook;
AMorgaut / example0.js
Created Jan 28, 2013
Some text used as Example Tip This example is public but could be private
View example0.js
//the code of the example
You can’t perform that action at this time.