git clone https://gist.github.com/6780d7cc0cabb1b4d6c8.git
$ npm install # maybe npm start will take care of it but just in case
$ npm start && open out.png
> offscreen-sample@1.0.0 start /Users/bsergean/src/offscreen_sample
/* | |
* V4L2 video capture example | |
* | |
* This program can be used and distributed without restrictions. | |
* | |
* This program is provided with the V4L2 API | |
* see http://linuxtv.org/docs.php for more information | |
*/ | |
#include <stdio.h> |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
/** | |
* Author: Jason White | |
* | |
* Description: | |
* Reads joystick/gamepad events and displays them. | |
* | |
* Compile: | |
* gcc joystick.c -o joystick | |
* | |
* Run: |
# Script to render a sequence of ply files with Blender. First, setup your scene | |
# and material for the imported meshes. Scene must be in "OBJECT"-mode. | |
# Fill in variables in options. | |
# References. | |
# See: http://blender.stackexchange.com/questions/24133/modify-obj-after-import-using-python | |
# and: http://blenderartists.org/forum/showthread.php?320309-How-to-import-ply-files-from-script | |
import bpy | |
# Options. | |
meshFolder = "" # Folder without ending "\\". |
// This is free and unencumbered software released into the public domain. | |
// | |
// Anyone is free to copy, modify, publish, use, compile, sell, or | |
// distribute this software, either in source code form or as a compiled | |
// binary, for any purpose, commercial or non-commercial, and by any | |
// means. | |
// | |
// In jurisdictions that recognize copyright laws, the author or authors | |
// of this software dedicate any and all copyright interest in the | |
// software to the public domain. We make this dedication for the benefit |