Skip to content

Instantly share code, notes, and snippets.

@wilwang
wilwang / gist:5243112
Created March 26, 2013 04:19
HTML/Javascript :: example of animated scrolling
<!DOCTYPE html>
<html>
<head>
<title>Express</title>
<link rel="stylesheet" href="/assets/bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="/stylesheets/style.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="/assets/bootstrap/js/bootstrap.js"></script>
</head>
<body>
@wilwang
wilwang / gist:3034508
Created July 2, 2012 17:40
Nano :: create db if not exists
var nano = require('nano')('http://localhost:5984');
var dbName = 'testdb';
var testDb = nano.use(dbName);
nano.db.list(function(error, databases) {
if (error)
return console.log('ERROR :: nano.db.list - %s', JSON.stringify(error));
if (databases.indexOf(dbName) < 0) {
nano.db.create(dbName, function(error, body, headers) {