Skip to content

Instantly share code, notes, and snippets.

View soulslicer's full-sized avatar

Raaj soulslicer

  • Carnegie Mellon University Robotics Institute
View GitHub Profile
anonymous
anonymous / gist:de6b81c556b5dc7cdc8b
Created February 20, 2015 01:42
Kernel panic in latest OS X in 10 lines of C
#include <unistd.h>
#include <mach/mach.h>
#include <mach/mach_vm.h>
#include <mach-o/dyld.h>
int
main (int argc, char * argv[])
{
volatile char * library;
const mach_vm_size_t page_size = getpagesize ();
@atinfinity
atinfinity / oclMat_custom_kernel.cpp
Last active September 14, 2023 07:26
sample code to execute custom OpenCL kernel on OpenCV 2.4.9
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/ocl/ocl.hpp>
// cl_mem構造体を参照するためにインクルード
#if defined __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif