Skip to content

Instantly share code, notes, and snippets.

View Frityet's full-sized avatar
😁
I LOVE LUA! ❤️

Frityet

😁
I LOVE LUA! ❤️
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
local https = require("ssl.https")
local ltn12 = require("ltn12")
local json = require("json")
local lgi = require("lgi")
local GObject = lgi.require("GObject")
local GTK = lgi.require("Gtk", "3.0")
---@param url string
---@return { [string] : string | number | table }
local function webhook_info(url)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <setjmp.h>
#include <signal.h>
static int sig_to_catch;
static void (^execption_handler)(int sig);
static jmp_buf exception_buffer;

Presentation Suisse

Slide 1-2

  • Je vais vous présenter la Confédération suisse, en mettant l'accent sur la partie francophone, plus précisément Genève
  • La Suisse a quatre langues officielles : l'allemand, le français, l'italien et le romanche. À Genève, on parle principalement français

Slide 3

  • Genève est une ville cosmopolite située au bord du lac Léman. Elle est célèbre pour ses attractions, comme le Jet d'Eau, une fontaine emblématique sur le lac, et la Cathédrale Saint-Pierre, un site historique dans la vieille ville

Slide 4

#include <clang/Frontend/CompilerInstance.h>
#include <clang/AST/ASTConsumer.h>
#include <clang/AST/RecursiveASTVisitor.h>
#include <clang/Rewrite/Core/Rewriter.h>
#include <clang/Frontend/FrontendPluginRegistry.h>
#include <clang/Frontend/FrontendAction.h>
#include <clang/Lex/Pragma.h>
#include <sstream>
#include <memory>
=================================================================
==59783==ERROR: AddressSanitizer: heap-use-after-free on address 0x60c000001660 at pc 0x000106f6bcab bp 0x7ff7b93672f0 sp 0x7ff7b93672e8
READ of size 1 at 0x60c000001660 thread T0
#0 0x106f6bcaa in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=[abi:v160003](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) string:1024
#1 0x106f6ad2c in ModulePragmaHandler::HandlePragma(clang::Preprocessor&, clang::PragmaIntroducer, clang::Token&) UAFTest.cpp:46
#2 0x10c80e716 in clang::Preprocessor::HandlePragmaDirective(clang::PragmaIntroducer)+0x56 (libclang-cpp.dylib:x86_64+0x1b9716) (BuildId: 74ad394874763760b74e808d09ca160c32000000200000000100000000000d00)
#3 0x10c7d8dd7 in clang::Preprocessor::HandleDirective(clang::Token&)+0x867 (libclang-cpp.dylib:x86_64+0x183dd7) (BuildId: 74ad394874763760b74e808d09ca160c32000000200000000100000000000d00)
#4 0x10

How to install game-porting-toolkit (aka proton for macOS)

You also might wanna just use Whisky which does this automatically

This guide works on macOS 13.4+ using Command Line Tools for XCode 15 Beta!

What is this?

In the recent WWDC, Apple announced and released the "game porting toolkit", which upon further inspection this is just a modified version of CrossOver's fork of wine which is a "compatibility layer" that allows you to run Windows applications on macOS and Linux.

; const char *, qword STRING.FROM_QWORD(char RDI buffer[RSI], qword RSI, signed qword RDX value)
export_function STRING.FROM_QWORD:
;qword R8 len = 0;
MOV R8, 0
;bool R9 negative = false;
MOV R9, FALSE
;if (value < 0)
CMP RDX, 0
JGE .0_l
@Frityet
Frityet / Pointer.m
Created July 16, 2023 23:35
Pointer.h
#include "ObjFW.h"
#define class @interface
#define extends :
#define end @end
#define public @public
#define private @private
#define declare
#import <ObjFW/ObjFW.h>
#define auto __auto_type
@interface AsyncDownloadRequest : OFObject<OFHTTPClientDelegate>
@property(readonly) OFFile *file;
+ (instancetype)requestWithFile: (OFFile *)file;