Skip to content

Instantly share code, notes, and snippets.

View ThibaultJanBeyer's full-sized avatar
🤖
Beedo…boop…bop…beeda…beep…boop…lop…bleeda…bee…bop…bleeda…booop…bopp

Thibault Jan Beyer ThibaultJanBeyer

🤖
Beedo…boop…bop…beeda…beep…boop…lop…bleeda…bee…bop…bleeda…booop…bopp
View GitHub Profile
@ThibaultJanBeyer
ThibaultJanBeyer / grow-mushrooms.md
Last active September 7, 2019 20:25
Tutorial on how to grow mushrooms yourself in your basement
@ThibaultJanBeyer
ThibaultJanBeyer / read-only-couchdb.json
Created July 5, 2018 17:21
read only couchdb: add this to the design documents of the database you want to protect. Now, only users with role admin will be able to edit or add documents to this database.
{
"_id": "_design/auth",
"language": "javascript",
"validate_doc_update": "function(newDoc, oldDoc, userCtx) { if (userCtx.roles.indexOf('admin') !== -1) { return; } else { throw ({ forbidden: 'Only admins may edit the database' }); } }"
}
040b1ada0a80e6c6e296745216d03347fbf6af44ebb820ae70c6d65e8627de6d6362a037f2f3e392f141e4f96382ec4c611a9665d3f270a0214f793a50c85a60da tonis2