This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beforeEach(()=>{ | |
Object.defineProperty(global.SVGSVGElement.prototype, 'createSVGMatrix', { | |
writable: true, | |
value: jest.fn().mockImplementation(() => ({ | |
martix: jest.fn(() => [[]]), | |
a: 0, | |
b: 0, | |
c: 0, | |
d: 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Self Modifying Code - Just for fun | |
// | |
// Created by Osman Azam on 3/22/14. | |
// Copyright (c) 2014 Osman Azam. All rights reserved. | |
// | |
// This code was tested on OSX. It will probably work in most *NIX systems. | |
// For windows you will need to find the win32 equivalent of mprotect and | |
// use a different method of putting the addTwoNumbers function into a data | |
// section. Also you will need to convert the inline assemblye from AT&T style |