Skip to content

Instantly share code, notes, and snippets.

View isorna's full-sized avatar
😃
New projects on the horizon

Alvaro Isorna isorna

😃
New projects on the horizon
View GitHub Profile
@isorna
isorna / extend.js
Last active August 29, 2015 14:16 — forked from katowulf/extend.js
function extend(base) {
var parts = Array.prototype.slice.call(arguments, 1);
parts.forEach(function (p) {
if (p && typeof (p) === 'object') {
for (var k in p) {
if (p.hasOwnProperty(k)) {
base[k] = p[k];
}
}
}
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@isorna
isorna / rules.bolt
Created November 13, 2015 11:41 — forked from davideast/rules.bolt
Securing user data - Bolt rules
isUser(uid) = auth != null && auth.uid == uid;
type Post {
uid: String;
title: String;
description: String;
timestamp: Number;
}
type User {