Skip to content

Instantly share code, notes, and snippets.

@yichaowang
yichaowang / index.html
Created March 23, 2015 03:59
JS Bin Yichao Test // source http://jsbin.com/modasa
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Yichao Test" />
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.2.1/lodash.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
@yichaowang
yichaowang / gist:4172606
Created November 29, 2012 23:20
WOOWOWOWOWOWOWWOWOWOWOWOOW
<% connection_json = @connections.to_json.html_safe.gsub("'", "&#x27;") -%>
@yichaowang
yichaowang / example.yam.ui.collection.js
Created September 7, 2012 05:50
A simple ui collection to handle interaction between components
yam.ctor('yam.ui.collection', {
init: function() {
this._subscriptions = {};
this._handleCounter = 0;
}
, trigger: function (topic, args) {
yam.log('ui model trigged '+topic+' event');
var s = this._subscriptions
, res = [];