Skip to content

Instantly share code, notes, and snippets.

View marcoaubr's full-sized avatar
👽

Marco Aurélio marcoaubr

👽
View GitHub Profile
@marcoaubr
marcoaubr / static_server.js
Created August 16, 2019 03:18 — forked from jianwu/static_server.js
Node.JS static file web server, also provides CORSProxy, Http/Https proxy function. Put it in your path to fire up servers in any directory, takes an optional port argument. If provide second https port argument, it will also start https. For https to work, need to put key and cert file in the folder.
#!/usr/bin/env node
/**
Static http server implemented with NodeJS.
Features:
1. No external dependencies
2. Support http/https, with custom port.
3. Support CORSProxy function
4. Zero configuration, convension over configuration
@marcoaubr
marcoaubr / nginx.conf
Created May 24, 2019 03:12 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@marcoaubr
marcoaubr / aggregation_lookup.md
Created April 23, 2019 06:06 — forked from bertrandmartel/aggregation_lookup.md
MongoDB $lookup aggregation example

MongoDB $lookup aggregation

SO link

db.votes.aggregate([{
    $lookup: {
        from: "users",
        localField: "createdBy",
        foreignField: "_id",