Skip to content

Instantly share code, notes, and snippets.

View roboshoes's full-sized avatar

Mathias Paumgarten roboshoes

View GitHub Profile
millermedeiros / example.html
Created August 28, 2012 13:52
node.js script to inline static includes
<!DOCTYPE html>
<!-- #include "inc_header.html" title="Example" header="Sample Title" -->
<meta charset="utf-8">
<link rel="stylesheet" href="css/main.css">
<h1>Sample Title</h1>
twe4ked /
Created September 26, 2012 06:43 — forked from ghoseb/
The evolution of a Python Programmer
#Newbie programmer
def factorial(x):
if x == 0:
return 1
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
webdesserts / Gulpfile.js
Last active April 3, 2023 08:16
Automatically reload your node.js app on file change with Gulp (
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise.
var gulp = require('gulp'),
spawn = require('child_process').spawn,
* $ gulp server
* description: launch the server. If there's a server already running, kill it.
patriciogonzalezvivo /
Last active July 15, 2024 12:10
GLSL Noise Algorithms

Please consider using instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
* create a function that will return true once any time the value changes
* @param {Object} object
* @param {String} key
function watchProperty(object, key){
var value = object[key];
return function(){
hapticdata / unique-colors.js
Last active March 18, 2016 21:33
extract the unique colors out of an image
module.exports = uniqueColors;
var _canvas;
* Collect all of the unique colors within an image,
* all pixel values are returned as [ red, green, blue, alpha ] between 0 - 255
* @param {Image|HTMLCanvasElement} image
* @param {Number} [x] to start sampling
* @param {Number} [y] to start sampling
mattdesl / frag.vert
Created May 17, 2016 21:25
shadow on transparent plane ThreeJS r76
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
varying vec3 vLightFront;
varying vec3 vLightBack;