Skip to content

Instantly share code, notes, and snippets.

View Frityet's full-sized avatar
😁
I have like 60 projects that i am not doing

Frityet

😁
I have like 60 projects that i am not doing
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <Block.h>
#include "mstring.h"
#define lambda ^
#define make_method(...) Block_copy(lambda __VA_ARGS__)
#define defmethod(name, ...) name = make_method
namespace CSharpSpeedTest
{
public static class MemoryCopy
{
public static unsafe void Fast(void* dst, void* src, ulong n)
{
var offset = 0;
while (n != 0)
{
if (n % sizeof(ulong) * 8 == 0)
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdbool.h>
#include <string.h>
#include <errno.h>
extern int errno;
#include <pthread.h>
//Compilation does require CURL, so you should compile once, and just use the .dll
/usr/local/bin/emcc -c -O0 -IClient/src -IClient/src/include -I/usr/local/Cellar/emscripten/3.1.7/libexec/system/include -Wall -Wextra -Werror -pthread -g -v -fsanitize=address,leak,undefined -fno-omit-frame-pointer -o build/.objs/client/wasm/x86_64/debug/Client/src/main.c.o Client/src/main.c
/usr/local/bin/emcc -c -O0 -IClient/src -IClient/src/include -I/usr/local/Cellar/emscripten/3.1.7/libexec/system/include -Wall -Wextra -Werror -pthread -g -v -fsanitize=address,leak,undefined -fno-omit-frame-pointer -o build/.objs/client/wasm/x86_64/debug/Client/src/rendering/render_main.c.o Client/src/rendering/render_main.c
"/usr/local/Cellar/emscripten/3.1.7/libexec/llvm/bin/clang" -target wasm32-unknown-emscripten -D__EMSCRIPTEN_SHARED_MEMORY__=1 -DEMSCRIPTEN -D__EMSCRIPTEN_major__=3 -D__EMSCRIPTEN_minor__=1 -D__EMSCRIPTEN_tiny__=7 -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -Werror=implicit-function-declaration -Xclang -iw
public unsafe class Memory : IDisposable
{
public int Count { get; private set; }
public int MaxCount { get; private set; }
private byte* _pointer;
public byte[] Bytes
{
get
template<typename T, T (*Get_F)(T *), void (*Set_F)(T *, T)>
class Property {
private:
T field_;
public:
explicit Property(T value)
{ this->field_ = value; }
[[nodiscard]]
[Serializable]
public struct IPv4Address
{
public byte Element1,
Element2,
Element3,
Element4;
public UInt16 Port;
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
@Frityet
Frityet / triangle.c
Last active November 30, 2021 20:20
Checks if a triangle is equilateral
#include <stdint.h>
#include <stdbool.h>
#include <math.h>
#include <stdio.h>
typedef struct {
uint16_t x, y;
} vector2_t;
#define POINT(_x, _y) (vector2_t) { .x = (_x), .y = (_y) }
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
CPU Family: 0x6