Skip to content

Instantly share code, notes, and snippets.

Redis + LibUV prototype README

Special thanks to Dušan Majkic (dmajkic, https://github.com/dmajkic/redis/) for his project on GitHub that gave us the opportunity to quickly learn some on the intricacies of Redis code. His project also helped us to build our prototype quickly.

Get source repository

First clone the Redis sources from https://github.com/antirez/redis.

  • On your computer create a working folder and cd into it.
  • Clone antirez/redis repository:
@biovisualize
biovisualize / README.md
Last active March 4, 2016 22:43
D3 chart plugin template

A template example to write simple chart plugins on top of D3. It is a base for discussion, so your are much welcome to modify it and comment it. The requirements are discussed on the wiki.

This implementation provides: div or svg parent, variants (bars or stacked bars), position, relative position (after or under another chart of the same svg parent), margins, gap between bars (in %), transition duration, separated data and labels (to discuss), uses axis component (to complete), chart size taken from the parent and will resize with it, all items accessible from CSS for styling, most options optional, automatic redraw on setting change and zero argument returns the value.

In this example, the first bar chart data updates periodically and a mouse click changes chart type.

// Here is a proposal for minimalist JavaScript classes, humbly offered.
// There are (at least) two different directions in which classes can be steered.
// If we go for a wholly new semantics and implementation, then fancier classical
// inheritance can be supported with parallel prototype chains for true inheritance
// of properties at both the class and instance level.
// If however, we keep current JavaScript prototype semantics, and add a form that
// can desugar to ES3, things must necessarily stay simpler. This is the direction
// I'm assuming here.
@addyosmani
addyosmani / pubsub.md
Created October 28, 2011 06:49
Four ways to do Pub/Sub with jQuery 1.7 and jQuery UI (in the future)

#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)

Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.

(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)

##Option 1: Using jQuery 1.7's $.Callbacks() feature:

$.Callbacks are a multi-purpose callbacks list object which can be used as a base layer to build new functionality including simple publish/subscribe systems. We haven't yet released the API documentation for this feature just yet, but for more information on it (including lots of examples), see my post on $.Callbacks() here:

// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/
var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
for (i=0; i<metas.length; i++) {
if (metas[i].name == "viewport") {
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
}
}