Skip to content

Instantly share code, notes, and snippets.

View mardafirmansyah's full-sized avatar
🏠
Working at @zenofa

Marda Firmansyah mardafirmansyah

🏠
Working at @zenofa
View GitHub Profile
@mardafirmansyah
mardafirmansyah / better-nodejs-require-paths.md
Created January 12, 2018 23:11 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@mardafirmansyah
mardafirmansyah / nginx.conf
Created September 3, 2017 06:36 — 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