Skip to content

Instantly share code, notes, and snippets.

View johnpauljanecek's full-sized avatar

John Paul Janecek johnpauljanecek

View GitHub Profile
class FunctionMeta(type):
class RpcWrapper(object):
def __init__(self,name):
self.name = name
def __call__(self):
print(self.name)
def __new__(cls, clsname, superclasses,attributedict):
print("clsname: ", clsname)
print("superclasses: ", superclasses)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@johnpauljanecek
johnpauljanecek / Basic Monkey Patching.js
Last active July 17, 2022 08:12
Monkey Patching Javascript
(function () {
/*
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function
createElement(tagName)
createElement(tagName, options)
https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement
*/
console.log("monkey patch start");
var old_CreateElement = Document.prototype.createElement
function new_CreateElement() {