Skip to content

Instantly share code, notes, and snippets.

View denisjacquemin's full-sized avatar
🎯
Focusing

Denis Jacquemin denisjacquemin

🎯
Focusing
View GitHub Profile
@denisjacquemin
denisjacquemin / couch.js
Created July 30, 2021 13:30 — forked from auggernaut/couch.js
Creating a per-user Database in CouchDB with nano.
exports.findOrCreateDB = function (config, creds, cb) {
var nano = require('nano')("http://" + config.couch_admin + ":" + config.couch_password + "@" + config.couch_host + ':' + config.couch_port);
var users = nano.use('_users');
var user = {
_id: "org.couchdb.user:" + creds.username,
name: creds.username,
roles: [],
type: "user",
@denisjacquemin
denisjacquemin / Sass mixin clearfix
Created August 3, 2012 08:19
Sass mixin clearfix
// source http://www.alistapart.com/articles/getting-started-with-sass/
// http://nicolasgallagher.com/micro-clearfix-hack/
@mixin clearfix {
// For modern browsers
&:before,
&:after {
content:" ";
display:table;
}