Skip to content

Instantly share code, notes, and snippets.

View mattholl's full-sized avatar
💭
🫖

Matthew Hollings mattholl

💭
🫖
View GitHub Profile
@ryanflorence
ryanflorence / static_server.js
Last active February 27, 2025 06:28
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@mrdoob
mrdoob / RequestAnimationFrame.js
Created February 22, 2011 14:50
Provides requestAnimationFrame in a cross browser way.
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
@louisremi
louisremi / jquery.cubicBezierEasing.js
Created March 30, 2011 16:36
prototype of cubic-bezier easings for jQuery
// example of use $(elem).animate( {top: 100}, $.cubicBezierEasing(.25,.1,.25,1) );
(function($) {
$.cubicBezierEasing = function(p0,p1,p2,p3,duration) {
var easingName = Array.prototype.join.call(arguments);
duration = duration || 1;
if ( !$.easing[easingName] ) {
$.easing[easingName] = function(pos) {
return cubicBezierAtTime.apply(null, Array.prototype.unshift.call(arguments, pos));
@mbostock
mbostock / .block
Last active November 22, 2022 23:32
Line Transition
license: gpl-3.0
anonymous
anonymous / openCVinstallError
Created February 23, 2012 03:29
Homebrew OpenCV install error
$ brew install -v opencv
/usr/bin/env python -c import numpy
==> Downloading http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.3.1/OpenCV-2.3.1a.tar.bz2
File already downloaded in /Users/NeilBetham/Library/Caches/Homebrew
/usr/bin/tar xf /Users/NeilBetham/Library/Caches/Homebrew/opencv-2.3.1a.tar.bz2
==> Patching
/usr/bin/patch -f -p1 -i 001-homebrew.diff
patching file modules/highgui/src/grfmt_exr.hpp
==> cmake . -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/opencv/2.3.1a' -DCMAKE_BUILD_TYPE=None -Wno-dev -DPYTHON_LIBRARY='/System/Library/Frameworks/Python.framework/Versions/2.7/Python' -DPYTHON_INCLUDE_DIR='/System/Library/Frameworks/Python.framework/Versions/2.7/Headers' -DPYTHON_PACKAGES_PATH='/usr/local/Cellar/opencv/2.3.1a/lib/python2.7/site-packages'
cmake . -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/opencv/2.3.1a' -DCMAKE_BUILD_TYPE=None -Wno-dev -DPYTHON_LIBRARY='/System/Library/Frameworks/Python.framework/Versions/2.7/Python' -DPYTHON_INCLUDE_DIR='/System/Library/Frameworks/Python.framewo
@noboko
noboko / app.fshader
Created March 26, 2012 16:20
learning WebGL for plask 01
void main(void) {
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
}
@noboko
noboko / app.fshader
Created March 26, 2012 17:35
Learning WebGL for Plask Lesson02
#ifdef GL_ES
precision highp float;
#endif
varying vec4 vColor;
void main(void) {
gl_FragColor = vColor;
}
@noboko
noboko / app.fshader
Created March 26, 2012 18:41
Learning WebGL for Plask Lesson 03
#ifdef GL_ES
precision highp float;
#endif
varying vec4 vColor;
void main(void) {
gl_FragColor = vColor;
}
@noboko
noboko / app.js
Created April 12, 2012 13:43
Learning WebGL for Plask Lesson 13
//Learning WebGL for Plask Lesson13
//Learing WebGL : http://learningwebgl.com/blog/?page_id=1217
//Github : https://github.com/gpjt/webgl-lessons (this script use 'moon.gif' & 'crate.gif'.)
//zoom : qe,
//lighting : v,
//useFragmentLighting : f
//useTexture : c,
//reset : r を割り当ててます。
//plaskで入力エリアを作る方法が無さげなのでtgyhujに平行光の色だけ割り当ててます。
//
@noboko
noboko / app.js
Created April 14, 2012 11:46
Learning WebGL for Plask lesson 14
//Learning WebGL for Plask Lesson14
//Learing WebGL : http://learningwebgl.com/blog/?page_id=1217
//Github : https://github.com/gpjt/webgl-lessons (this script use 'earth.jpg' , 'arroway.de_metal+structure+06_d100_flat.jpg' and 'Teapot.json')
//zoom : qe,
//lighting : v,
//useFragmentLighting : f
//useTexture : c,
//reset : r,
//specularColor : tgyhuj,
//