Skip to content

Instantly share code, notes, and snippets.

View sfentress's full-sized avatar

Sam Fentress sfentress

  • Concord Consortium
View GitHub Profile
http://lab.dev.concord.org/examples/interactives/interactives.html#interactives/oil-and-water-shake.json:
browser version cpu/os date molecules temperature 100 Steps (steps/s) 100 Steps w/graphics interactive
Safari 5.1.7/534.57.2 Intel Mac OS X 10_6_8 2012-09-17 14:32 44 300 84.0 65.1 /examples/interactives/interactives.html#interactives/oil-and-water-shake.json
Safari 5.1.7/534.57.2 Intel Mac OS X 10_6_8 2012-09-17 14:32 44 300 85.8 60.3 /examples/interactives/interactives.html#interactives/oil-and-water-shake.json
Safari 5.1.7/534.57.2 Intel Mac OS X 10_6_8 2012-09-17 14:32 44 300 88.3 66.1 /examples/interactives/interactives.html#interactives/oil-and-water-shake.json
Safari 5.1.7/534.57.2 Intel Mac OS X 10_6_8 2012-09-17 14:32 44 300 85.8 64.1 /examples/interactives/interactives.html#interactives/oil-and-water-shake.json
npm http 304 https://registry.npmjs.org/difflet
npm ERR! Error: ENOENT, chmod '/Users/sfentress/projects/lab/src/vendor/jquery/node_modules/grunt/node_modules/nodeunit/node_modules/tap/node_modules/difflet/example/cmp_object.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Darwin 10.8.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "grunt@0.3.15"
npm ERR! cwd /Users/sfentress/projects/lab/src/vendor/jquery
$ npm cache clean
npm ERR! Error: EPERM, chmod '/Users/sfentress/.npm/buffer-equal/0.0.0/package'
npm ERR! { [Error: EPERM, chmod '/Users/sfentress/.npm/buffer-equal/0.0.0/package']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: '/Users/sfentress/.npm/buffer-equal/0.0.0/package' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 10.8.0
$ make test
./script/generate-js-config.rb
./script/generate-js-version.rb
mkdir -p server/public/lab-amd
rsync -aq src/lab/* server/public/lab-amd
[...]
converting MML files...converted 0 MML files.
./node-bin/create-mml-html-index
Created index at /Users/sfentress/projects/lab/server/public/imports/legacy-mw-content/legacyMMLRunnables.html
[...]
@sfentress
sfentress / gist:4944986
Last active December 13, 2015 17:08
Drake animation
/***
* Animates one frame of a drake movement.
*
* Passes in $img, which is a jQuery selection of all the layers in the image stack
* (e.g. $("#my-drake .layer)), and frames, which is simply the number of frames in the
* animation (so we can start from the begining one we're at the end).
*
* This function is a little more complicated than is needed for animating one single image,
* as it is designed to make animating several drakes at once more efficient. In this function,
* we have a list of $img's we want to animate, GG.drakeAnimationList. Matched to this we have
Obstacle names:
blue
green
red
fire
nonmetallic
metallic
narrow-spines
medium-spines
@sfentress
sfentress / index.html
Last active December 14, 2015 07:48
Using $(window).mouseup to catch mouseup events outside a window or iframe
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
$(function() {
// hand-rolled drag functionality
$("#box").on("mousedown", function(e) {
var $drag = $(this).addClass('draggable'),
z_idx = $drag.css('z-index'),
@sfentress
sfentress / index.html
Created February 27, 2013 23:35
Using $(window).mouseup to catch mouseup events outside an iframe
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
$(function() {
// hand-rolled drag functionality
$("#box").on("mousedown", function(e) {
var $drag = $(this).addClass('draggable'),
z_idx = $drag.css('z-index'),
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
svg {
border: solid 1px #aaa;
}