Skip to content

Instantly share code, notes, and snippets.

@janily
janily / usage.md
Created July 27, 2012 10:36 — forked from wiky/design.md
NanoDB Usage (draft)

#NanoDB Usage (draft)

定位:跨应用,跨平台

##Creating Database

创建数据库,只需要提供库名(此名字用于标识数据库在内存中的名字)和数据源(数据源为空则是一个空数据库)。数据源的来源不关心,只要是完整的JSON数据对象即可。

nano.db('mydb', {

users: [],

@janily
janily / dabblet.css
Created September 29, 2012 01:47 — forked from anonymous/dabblet.css
================================================================
/* ================================================================
This copyright notice must be untouched at all times.
The original version of this stylesheet and the associated (x)html
is available at http://www.cssplay.co.uk/menu/cssplay-pie-chart.html
Copyright (c) Stu Nicholls. All rights reserved.
This stylesheet and the associated (x)html may be modified in any
way to fit your requirements.
=================================================================== */
@janily
janily / dabblet.css
Created October 9, 2012 04:37
image shapes
/**
* image shapes
* ------------
* shapes work in all current versions of Chrome, Firefox, IE, Opera, Safari
* animations work properly in Chrome, Firefox, Safari
* are all wrong in Opera
* and are not supported by IE9
*/
html {
min-height: 100%;
@janily
janily / bootstrap-plugins.txt
Created November 1, 2012 09:57 — forked from mklabs/bootstrap-plugins.txt
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
@janily
janily / gist:4245878
Created December 9, 2012 16:23
position center
(function($){
$.fn.extend ({
center:function() {
return this.each(function(){
var top = ($(window).height() - $(this).outerHeight())/2;
var left = ($(window).width() - $(this).outerWidth())/2;
$(this).css({position:'absolute',margin:0,top:(top>0 ? top:0)+'px',left:(left>0 ? left:0)+'px'});
});
}
});
@janily
janily / dabblet.css
Created February 16, 2013 13:44
Untitled
#box {
width:100px;
height:100px;
border:6px solid #444;
background:red;
animation:change 3s infinite;
}
@keyframes change {
0% {background:red;}
100% {background:blue;}
@janily
janily / dabblet.css
Created February 16, 2013 14:21 — forked from alexmwalker/dabblet.css
Traffic light animation
/**
* Traffic light animation
*/
#trafficlight{
background:#333;
height:300px;
width:150px;
border-radius:30px;
margin:3em auto;
@janily
janily / dabblet.css
Created February 16, 2013 15:16 — forked from LeaVerou/dabblet.css
Pounding heart animation
/* Pounding heart animation */
@keyframes pound {
to { transform: scale(1.4); }
}
.heart {
display: inline-block;
font-size: 150px;
color: #e00;
@janily
janily / dabblet.css
Created April 1, 2013 08:50 — forked from LeaVerou/dabblet.css
iOS 6 style switch checkboxes
/**
* iOS 6 style switch checkboxes
* by Lea Verou http://lea.verou.me
*/
:root input[type="checkbox"] { /* :root here acting as a filter for older browsers */
position: absolute;
opacity: 0;
}
@janily
janily / dabblet.css
Created April 3, 2013 07:49 — forked from liuyuan87/dabblet.css
Untitled
/*一淘面试题*/
.clearfix{*zoom:1;}
.clearfix:before,.clearfix:after{ display: table; content: "\0020"; line-height: 0; }
.clearfix:after { clear: both; }
ol{ padding-left:0; margin:0; list-style-type:none; width:170px;}
li{ float:left;margin-left: -5px; margin-top: -5px; text-align:center;}
li a{color:#008000; border:5px solid #0000f0;width:50px; height:50px; display:block;line-height:50px;text-decoration:none;position:relative; }
li a:hover{ border-color:#f00000;z-index: 1;}