Skip to content

Instantly share code, notes, and snippets.

View nickytoh's full-sized avatar
🎯
Focusing

Nicky Toh nickytoh

🎯
Focusing
View GitHub Profile
var fs = require('fs'),
sys = require('sys'),
http = require('http');
http.createServer(function (req, res) {
checkBalanceFile(req, res);
}).listen(8000);
function checkBalanceFile(req, res) {
fs.stat("balance", function(err) {
@nickytoh
nickytoh / nginx.conf
Created April 20, 2018 05:09 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
# Advanced config for NGINX
server_tokens off;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;