Skip to content

Instantly share code, notes, and snippets.

View tjwudi's full-sized avatar

Di Wu tjwudi

View GitHub Profile
@tjwudi
tjwudi / index.html
Created May 20, 2015 17:03
Fast prototyping with gist
<html>
<head></head>
<body>
A demo page for fast prototyping.
</body>
</html>
@tjwudi
tjwudi / bookmarks
Created May 17, 2015 01:18
Bookmarks
icecomm.io|webrtc
@tjwudi
tjwudi / brush.js
Last active August 29, 2015 14:21 — forked from enjalot/brush.js
if(!d3.chart) d3.chart = {};
d3.chart.brush = function() {
var g;
var data;
var width = 600;
var height = 30;
var dispatch = d3.dispatch(chart, "filter");
function chart(container) {
@tjwudi
tjwudi / index.html
Created May 14, 2015 03:25
d3 table
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>D3 Playground</title>
</head>
<body>
<div id="display"></div>
<script src="//cdn.jsdelivr.net/jquery/2.1.4/jquery.min.js"></script>
<script src="//cdn.jsdelivr.net/d3js/3.5.5/d3.min.js"></script>
@tjwudi
tjwudi / _.md
Created May 13, 2015 12:45
barchart
@tjwudi
tjwudi / pre-commit
Created April 16, 2015 07:52
Git pre-commit hook
# Do not push to master
if [ $(git rev-parse --abbrev-ref HEAD) == "master" ]
then
echo 'Hello'
exit 1
fi
@tjwudi
tjwudi / Gruntfile.js
Created February 11, 2015 13:47
Gruntfile.js template
// Gruntfile.js
module.exports = function (grunt) {
// load all grunt tasks matching the ['grunt-*', '@*/grunt-*'] patterns
require('load-grunt-tasks')(grunt);
grunt.initConfig({
});
grunt.registerTask('default', []);
module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
exec:{
prepare:{
command:"cordova prepare",
stdout:true,
stderror:true
}
@tjwudi
tjwudi / LimeAPI.js
Last active August 29, 2015 14:04
LimeJS often-used APIs
// Create a director
director = new lime.Director(document.body, 1024, 768);
// Create a scene
scene = new lime.Scene();
// Add a scene to director
director.replaceScene(scene);
// Schedule Manager Example