Open eugeneware opened 10 years ago
this one is pretty cool, but maybe not exactly what we are looking for http://requirebin.com/?gist=6264704
I think also having an inline (embedded jsfiddle type thing), might be cool.
In terms of snippets, definitely visualization type stuff would be cool. Maybe we could use @anvaka's visualization stuff if that's really modular.
Or the game engine stuff that's been built to be modular, can't remember the name of the libraries.
Or some d3 stuff, or some two-way databinding... or even some level.js stuff. Like full-text indexing or some stuff in the browser. Or... all of the above... Have a carousel of different snipets.
Seven lines grid graph:
var graph = require('ngraph.generators').grid(10, 10);
var svg = require('ngraph.vivasvg')(graph);
svg.nodeTemplate(["<text y='-5'>{{id}}</text>",
"<circle r='5' fill='#00BFFF'></circle>"].join('\n'));
svg.linkTemplate("<arrow stroke='#D3D3D3' from='{{pos.from}}' to='{{pos.to}}' offset='8'></arrow>'");
svg.run();
Confetti http://requirebin.com/?gist=9555946 :)
That's crazy @anvaka . Thanks mate!
Also, that modular game stuff - I think I found it: https://github.com/hughsk/game-modules/wiki/Modules
But I thought there was a website for it.
That game page is: http://crtrdg.com/
WIP page with a few demos is up at http://maxogden.github.io/browserify-website/demos.html
@maxogden something is broken - there is a js error on the page right now
var headFile = files['page-head.html']
// Uncaught TypeError: Cannot read property 'page-head.html' of undefined
@anvaka what browser are you using? does it happen if you view the /embed urls individually? I am not seeing that error
@maxogden it's OSX Chrome. Ah, I see what's going on. Gist returns this error:
"API rate limit exceeded for XX.XX.XX.XX. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)"
@anvaka gotcha, I see that intermittently + have a fix in the works
One more example: easy to do quick micro benchmarking tests with @jdalton 's benchmark
module.
E.g. what is faster: iterate over keys of object without prototype or with prototype?
Apparently on object without prototype, if I made this test correctly :)
Some snippet that gets people "OMG! I can that? That was easy!"
Like the node.js http server example, but for browserify.