Skip to content

Instantly share code, notes, and snippets.

@bsergean
bsergean / README.md
Last active March 26, 2024 16:16
three.js + headless.gl rendering with texturing

Getting the code

git clone https://gist.github.com/08be90a2f21205062ccc.git

Executing the code

$ 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

@sandfox
sandfox / CertificateGeneration.sh
Created February 15, 2012 00:11
TLS certificate inspection example (using nodejs)
###
#Step 1 - Generate server certificates etc... (most of this code is horribly ripped off from nodejs docs currently -> http://nodejs.org/docs/latest/api/tls.html)
###
#Assuming your starting from a clean directory
mkdir server
cd server
#generate private key
@jeremyckahn
jeremyckahn / touchify.js
Created August 11, 2011 21:52
A function to make Backbone Views touch-ready
/**
* Asesses all of the events handlers bound on an View and makes touch event equivalents.
*
* Dependencies: Backbone, jQuery, Ben Alman's Outside Events jQuery plugin updated to support "touchstart"
*
* @param {Backbone.View} view
*/
function touchify (view) {
_.each(view.events, function (value, key) {
_.each({'mouseleave': 'touchstartoutside', 'mouseenter': 'touchstart'}, function (eventValue, eventKey) {