Skip to content

Instantly share code, notes, and snippets.

View xmesaj2's full-sized avatar
🆗

Mesaj xmesaj2

🆗
View GitHub Profile
@ingride
ingride / gist:7bb61483127d1f6d85a35d772b589090
Last active May 24, 2023 17:44
Return a String from C++ to WASM
// C++ bit . save it in an example.cpp file
#include "emscripten.h"
extern "C" {
inline const char* cstr(const std::string& message) {
char * cstr = new char [message.length()+1];
std::strcpy (cstr, message.c_str());
return cstr;
}
EMSCRIPTEN_KEEPALIVE
const char* getAMessage() {
@TimHess
TimHess / CertHelpers.cs
Created December 24, 2019 18:50
Postgres Client Certs
using Microsoft.Extensions.Configuration;
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Security;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using System.Text;
namespace PostgreEFCore
@sarimarton
sarimarton / crossover-howtocompile.md
Last active May 2, 2024 08:16 — forked from Alex4386/crossover-howtocompile.md
CodeWeavers CrossOver - How to compile from source! for macOS

UPDATE 2023-01-22 21:34:33

This guide was last tested on an Intel MacBook 2017. Since then it's unmaintained and won't be updated (I quit the game and bought a life-time crossover licence).


This has been forked from https://gist.github.com/Alex4386/4cce275760367e9f5e90e2553d655309

For the latest discussion, see the comments there.

@sr229
sr229 / install-anbox-dkms-fedora.sh
Last active December 21, 2023 17:59
Automated Script to Install Anbox Ashmem and Binder to WSL2 Linux Kernel
#!/bin/bash
set -o pipefail
KERNEL_WORKING_DIRECTORY="/usr/src"
KERNEL_VERSION=$(uname -r)
REQUIRED_DEPENDENCIES="git bison flex elfutils-libelf-devel openssl-devel"
KERNEL_SRC_DIR="$KERNEL_WORKING_DIRECTORY/WSL2-Linux-Kernel-$(uname -r)"
echo "Warning: This script has to be run on sudo permissions. If you encounter issues please report it immediately."
@aleksasiriski
aleksasiriski / proxmoxlxcjellyfin.md
Last active April 5, 2024 17:45
Proxmox LXC Alpine Docker Jellyfin

How to setup VA-API within Proxmox LXC Unprivileged container

Proxmox configuration

No drivers need to be installed on the proxmox, from now called host.

Find GIDs of video and render group on host:

cat /etc/group | grep video

cat /etc/group | grep render