Skip to content

Instantly share code, notes, and snippets.

View eruffaldi's full-sized avatar

Emanuele Ruffaldi eruffaldi

View GitHub Profile
@eruffaldi
eruffaldi / CMakeLists.txt
Last active May 27, 2016 04:02 — forked from allanmac/assert_cuda.c
A tiny example of CUDA + OpenGL interop with write-only surfaces and CUDA kernels. Uses GLFW+GLAD.
#sudo pip install --upgrade git+https://github.com/dav1dde/glad.git#egg=glad
#python main.py --api gl=3.3 --generator=c --out-path=GL
find_package(CUDA)
find_package(GLFW)
include_directories(${GLFW_INCLUDE_DIRS})
include_directories(GL/include)
cuda_add_executable(main main.c assert_cuda.c interop.c GL/src/glad.c kernel.cu)
target_link_libraries(main ${GLFW_LIBRARY})
@eruffaldi
eruffaldi / current_utc_time.c
Created January 28, 2017 13:25 — forked from jbenet/current_utc_time.c
work around lack of clock_gettime in os x
/*
author: jbenet
os x, compile with: gcc -o testo test.c
linux, compile with: gcc -o testo test.c -lrt
*/
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
@eruffaldi
eruffaldi / openssh-build-static.sh
Last active January 4, 2024 07:23 — forked from fumiyas/openssh-build-static.sh
Build OpenSSH with static linked zlib and OpenSSL libraries
#!/usr/bin/env bash
# Dependencies: curl gcc make autoconf
#
# Changes: 2024-01-03 Emanuele Ruffald
# Updated to latest libraries, modified for building openssh, added some if for debugging
set -uex
umask 0077
ZLIB_VERSION=1.3