Skip to content

Instantly share code, notes, and snippets.

View sleeyax's full-sized avatar

Sleeyax sleeyax

View GitHub Profile
@zbraniecki
zbraniecki / README.md
Last active November 7, 2024 03:55
Rust <--> C/C++ FFI for newbies

As Gecko is moving toward more Rust code, the cases where Rust and C code interoperate will become more common.

This document is an attempt to ease the learning curve for engineers facing it for the first time. It assumes no prior experience with cross-language C interfaces (called FFI).

It also assumes that Rust code is already built into Gecko. If you need help with that, read Introducing Rust code in Firefox.

What can you transfer across the fence

@Techbrunch
Techbrunch / xamarin-reverse-engineering.md
Last active July 12, 2024 16:31
Xamarin Reverse Engineering

Notes:

Regarding the interception of HTTP:

We did it through USB reverse tunneling and iptable rules local to the phone.

@glycerine
glycerine / go-env-with-msys2.md
Created April 26, 2020 01:07 — forked from voidexp/go-env-with-msys2.md
Go development environment on Windows with MSYS2

Go development environment on Windows with MSYS2

Normally, it is sufficient to grab the Go MSI installer from the website in order to set up the toolchain. However, some packages that provide Go wrappers for C libraries rely on cgo tool, which in turn, needs the GCC toolchain in order to build the glue code. Also, 3rd-party dependencies are usually hosted on services like GitHub, thus Git is also needed. This mini-guide illustrates how to setup a convenient development environment on Windows using MSYS2.

@iMikio
iMikio / firestore.go
Last active June 25, 2023 03:01 — forked from roboncode/firestore.go
Firestore - GoLang Transform Struct To Map
package transform
import (
"reflect"
"strings"
"time"
)
const (
tagName = "firestore"
{
"PX1": "no_script",
"PX2": "js_bootstrap",
"PX3": "domready",
"PX4": "fingerprint",
"PX6": "nav_timing",
"PX7": "incognito",
"PX8": "score_session",
"PX9": "score_impression",
"PX10": "ui_interaction",
@gitname
gitname / README.md
Last active June 10, 2024 09:20
Using `@react-pdf/renderer` with React 18

Using @react-pdf/renderer v3.0.1 with React 18

Introduction

When I tried to use the @react-pdf/renderer package (version 3.0.1) with a React 18 app, two problems arose. In this article, I'll describe those problems and tell you how I solved them.

Update: Here's a video demonstration of the problems and solution described in this article: https://youtu.be/YZP5r7Uy_bU

Problem 1: Dependency Conflict

@t3dotgg
t3dotgg / try-catch.ts
Last active April 13, 2025 13:23
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};