This file contains hidden or 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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <math.h> | |
| #include <assert.h> | |
| #include <Windows.h> | |
| #include <ft2build.h> | |
| #include FT_FREETYPE_H | |
| #define STB_IMAGE_WRITE_IMPLEMENTATION |
This file contains hidden or 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
| // This code has been ported from the original (https://github.com/aappleby/smhasher/) to c3 | |
| import ntypes; | |
| //----------------------------------------------------------------------------- | |
| // MurmurHash3 was written by Austin Appleby, and is placed in the public | |
| // domain. The author hereby disclaims copyright to this source code. | |
| // Note - The x86 and x64 versions do _not_ produce the same results, as the | |
| // algorithms are optimized for their respective platforms. You can still |
This file contains hidden or 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
| from asyncio import create_task, Future | |
| from functools import wraps | |
| # this is needed as the create_task only holds a weak reference to the task so it could be garbage collected | |
| _running_tasks = {} | |
| def _get_id(): | |
| i=0 | |
| yield i | |
| while True: | |
| i+=1 |
This file contains hidden or 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
| CanvasRenderingContext2D.prototype._textWrap = function(text, x, y, width, renderTextFn){ | |
| let size = this.measureText(text); | |
| let height = size.fontBoundingBoxDescent + size.fontBoundingBoxAscent | |
| if (size.width > width){ | |
| let words = text.split(" ").reverse(); | |
| let thiswords = []; | |
| do{ | |
| thiswords.push(words.pop()); | |
| size = this.measureText(thiswords.join(" ")) | |
| }while (size.width < width); |
This file contains hidden or 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
| CONHOST command line arguments | |
| this information may be out of date as microsoft has said that they will not keep this consistent | |
| all the information i found by experementing and reading the source at https://github.com/microsoft/terminal | |
| server handle token (accepted two ways) | |
| --server 0x4 (new method) | |
| 0x4 (legacy method) | |
| the arguments must contain only one of these | |
| --signal <arg:short as handle> | |
| an optional file handle that will be used to send signals into the console. | |
| This represents the ability to send signals to a *nix tty/pty |
This file contains hidden or 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
| /* (c) RJ_Infinity | |
| i cant be borthered to find a proper license so just be sensible when using it and give me credit thanks | |
| */ | |
| class memAlloc{ | |
| static DEBUG = false | |
| memAllocs={}; | |
| freeMem={}; | |
| setMemory(memory){this.memory = memory;} | |
| alloc(size){ |