Skip to content

Instantly share code, notes, and snippets.

View 525c1e21-bd67-4735-ac99-b4b0e5262290's full-sized avatar

525c1e21-bd67-4735-ac99-b4b0e5262290

View GitHub Profile
THREE.WebGLRenderer = (parameters) ->
_canvas = document.createElement 'canvas'
_gl = null
_oldProgram = null
_oldFramebuffer = null
_this = this
# gl state cache
_oldDoubleSided = null
6: src/Three.js
8: src/materials/MeshFaceMaterial.js
11: examples/js/Stats.js
11: src/renderers/renderables/RenderableObject.js
12: src/materials/ParticleDOMMaterial.js
12: examples/js/PRNG.js
12: src/scenes/FogExp2.js
13: examples/js/Tween.js
13: src/scenes/Fog.js
13: src/lights/AmbientLight.js
isabel:webclient pyrotechnick$ npm install dnode
[email protected] ../node_modules/dnode/node_modules/dnode-protocol
[email protected] ../node_modules/dnode/node_modules/lazy
[email protected] ../node_modules/dnode/node_modules/traverse
[email protected] ../node_modules/dnode/node_modules/socket.io
[email protected] ../node_modules/dnode/node_modules/browserify/node_modules/es5-shim
[email protected] ../node_modules/dnode/node_modules/browserify/node_modules/hashish
[email protected] ../node_modules/dnode/node_modules/browserify/node_modules/source
[email protected] ../node_modules/dnode/node_modules/browserify/node_modules/coffee-script
[email protected] ../node_modules/dnode/node_modules/browserify/node_modules/findit/node_modules/seq/node_modules/chainsaw
isabel:webclient pyrotechnick$ npm install dnode
[email protected] ./node_modules/dnode/node_modules/dnode-protocol
[email protected] ./node_modules/dnode/node_modules/lazy
[email protected] ./node_modules/dnode/node_modules/traverse
[email protected] ./node_modules/dnode/node_modules/socket.io
[email protected] ./node_modules/dnode
isabel:webclient pyrotechnick$ coffee server.coffee
Error: Cannot find module 'dnode'
at Function._resolveFilename (module.js:320:11)
at Function._load (module.js:266:25)
@525c1e21-bd67-4735-ac99-b4b0e5262290
525c1e21-bd67-4735-ac99-b4b0e5262290 / LICENSE.txt
Created May 24, 2011 03:26 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
classmethod = (class_, methods) ->
for own name, method of methods
class_[name] = method
class_::[name] = (args...) ->
method.apply @constructor, args
class Atom
module.exports = id = new Object
class id.Greek
_index: 0
next: => id.Greek.map.lower[(Object.keys id.Greek.map.lower)[@_index++]]
reset: => _index = 0
greek = new id.Greek
id.greek = greek.next
@525c1e21-bd67-4735-ac99-b4b0e5262290
525c1e21-bd67-4735-ac99-b4b0e5262290 / wikipedia_periodic_element_scraper.coffee
Created August 27, 2011 14:17
wikipedia periodic element scraper (i.e. elements.json)
scraper = require 'scraper'
async = require 'async'
index = 'http://en.wikipedia.org/wiki/Periodic_table'
console.log "-scrape #{index}"
scraper index, (error, jQuery) ->
console.log error if error
<table class="wikitable" style="font-size: 85%; text-align: center; width: auto;">
<caption>Comparison of iOS screens, assuming portrait orientation</caption>
<tbody><tr>
<th style="width:12em;" colspan="2">Display</th>
<th>Classic</th>
<th>Retina</th>
<th>iPad</th>
</tr>
<tr>
<th colspan="2">Models</th>
window.requestAnimationFrame ?=
window.mozRequestAnimationFrame or
window.msRequestAnimationFrame or
window.oRequestAnimationFrame or
window.webkitRequestAnimationFrame or
(callback) -> window.setTimeout callback, 1000 / 60