Skip to content

Instantly share code, notes, and snippets.

View neudinger's full-sized avatar
🎯
Focusing

KB neudinger

🎯
Focusing
  • France
View GitHub Profile
@bruxisma
bruxisma / CMakeLists.txt
Last active July 31, 2025 21:55
AppImage + CPack Experiment
# This isn't meant to be a fully featured implementation. It's just a small playground project.
# Use `cmake -Bbuild -S. -GNinja` to generate the project
# Then use `cmake --build build --target package` to generate a .appimage file ready to go
# This project DOES do dangerous things and tries to download the linuxdeploy tool directly.
# When this makes it into IXM, it will be expected that users have the linuxdeploy tool installed to *some* location.
# It will NOT download and execute something from the internet.
cmake_minimum_required(VERSION 3.16)
project(summon-test LANGUAGES CXX VERSION 0.1.0)
add_executable(app)

Simple WasmBoxC Library Example

This shows how to easily sandbox a real-world library using WasmBoxC. Specifically we sandbox the zlib compression library.

To follow along with this, you can clone this gist and then do the following commands.

First, get the emsdk:

@simon-mo
simon-mo / Makefile
Created January 30, 2019 09:07
Dynamic Kernel Loading using CUDA Driver API
all: hello hello.fatbin hello.ptx dyload
hello: kernel.cu
nvcc -std=c++11 -arch sm_60 kernel.cu -o hello -lcuda
hello.fatbin: kernel.cu
nvcc -std=c++11 -arch sm_60 kernel.cu -o hello.fatbin --fatbin -lcuda
hello.ptx: kernel.cu
nvcc -std=c++11 -arch sm_60 kernel.cu -o hello.ptx -ptx
dyload: hello.fatbin load.cu
nvcc -std=c++11 -arch sm_60 load.cu -o dyload -lcuda
clean:
@tailriver
tailriver / dlopen_sample.c
Created November 18, 2015 04:21
A sample of using dlopen library.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dlfcn.h>
int main(int argc, char** argv)
{
void *handle;
void (*func_print_name)(const char*);
/*
* TOTP: Time-Based One-Time Password Algorithm
* Copyright (c) 2015, David M. Syzdek <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
@gautambak
gautambak / gist:2836941
Created May 30, 2012 15:19
cuda memory example
// CUDA-C includes
#include <cuda.h>
#include <stdio.h>
#include "../common/book.h"
extern "C"
int runCudaPart();
// CODE goes below