This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Tiny Carousel 1.9 | |
* http://www.baijs.nl/tinycarousel | |
* | |
* Copyright 2010, Maarten Baijs | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.opensource.org/licenses/gpl-2.0.php | |
* | |
* Date: 01 / 06 / 2011 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# | |
""" | |
cvt.py -- script to downsample images for book creation | |
Comments, patches welcome: | |
Eric Jeschke ([email protected]) | |
(c) 2009 Eric R. Jeschke ([email protected]). | |
This work is licensed under a Creative Commons Attribution-Share Alike |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/questions/788277/iphone-strange-error-when-testing-on-simulator | |
ps ax | grep Simulator | |
# list zombie processes | |
ps -el | grep "Z" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://broutilles.com/2011/04/22/imagemagick-how-to-slice-an-image-in-parts/ | |
convert svg-cards.png -crop 179x260 +repage +adjoin cards_%02d.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Car = function() { | |
this.beep = function() { | |
return 'beep'; | |
} | |
this.honk = function() { | |
return 'honk'; | |
} | |
return this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var array; | |
var arrayTest = new MUNIT.Test([ | |
function lengthZeroWhenEmpty() { | |
this.assertEquals(0, array.length); | |
}, | |
function lengthNotZeroIfNotEmpty() { | |
array.push(1); | |
this.assertTrue(array.length != 0); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author mrdoob / http://mrdoob.com/ | |
* @author alteredq / http://alteredqualia.com/ | |
* @author paulirish / http://paulirish.com/ | |
*/ | |
THREE.FirstPersonControls2 = function ( object, domElement ) { | |
var latitude = 0, | |
longitude = 0, | |
phi = 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float find_closest(int x, int y, float c0) { | |
/* | |
Original looping code, from http://devlog-martinsh.blogspot.com.es/2011/03/glsl-dithering.html | |
vec4 dither[4]; | |
dither[0] = vec4( 1.0, 33.0, 9.0, 41.0); | |
dither[1] = vec4(49.0, 17.0, 57.0, 25.0); | |
dither[2] = vec4(13.0, 45.0, 5.0, 37.0); | |
dither[3] = vec4(61.0, 29.0, 53.0, 21.0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# vim: syntax=sh | |
. /etc/rc.conf | |
. /etc/rc.d/functions | |
daemon_name=php-cgi | |
BIND=/tmp/php-cgi.socket | |
USER=gimi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var projector = new THREE.Projector(); | |
var ray = projector.pickingRay( mouseCoord, camera ); // (mouse coord are in screenspace and must be [-1, 1]) | |
var objects = ray.intersectObjects( scene.children ); | |
if( objects.length ) | |
{ | |
objects[ 0 ].object; // THREE.Particule or THREE.Mesh | |
objects[ 0 ].face; // THREE.Face3 or THREE.Face4 (is .object is a Mesh | |
objects[ 0 ].point; // THREE.Vector3 | |
} |