Skip to content

Instantly share code, notes, and snippets.

View jacksctsai's full-sized avatar
🏠
Working from home

Jack Tsai jacksctsai

🏠
Working from home
View GitHub Profile
@jacksctsai
jacksctsai / safari-css-transition-test.html
Created November 13, 2013 06:30
This makes safari crashes. Try to hover the blue box and you will see...
<html>
<style media="screen" type="text/css">
.box {
border-style: solid;
border-width: 1px;
display: block;
width: 300px;
min-height: -moz-calc(100% - 1px);
min-height: -o-calc(100% - 1px);
min-height: -webkit-calc(100% - 1px);
define([
dependencies...
], function($, backbone, ...) {
var BookView = backbone.View.extend({
$el: $('#mainblock'),
initialize: function() {
},
render: function() {
...
this.$el.html(compiledHTML);
@jacksctsai
jacksctsai / Db.js
Created April 10, 2012 05:12
DB module for console based node.js application
var mongodb = require('mongodb');
var events = require('events');
var eventEmitter = new events.EventEmitter();
var db = new mongodb.Db('Sika', new mongodb.Server(host, port, {}));
var dbclient = null;
db.open(function(err, db_client) {
if (err) throw err;