Skip to content

Instantly share code, notes, and snippets.

View Phrozyn's full-sized avatar
🎯
Focusing on Optimizations and Efficiencies

A Smith Phrozyn

🎯
Focusing on Optimizations and Efficiencies
View GitHub Profile
server {
listen 58080;
# Disable the port number in redirects, since it's behind a load balancer
port_in_redirect off;
location / {
if ($http_x_forwarded_proto != 'https') {
return 301 https://$host$request_uri;
}
@s0undt3ch
s0undt3ch / cassandra.service
Created September 18, 2015 14:01
CentOS 7 Cassandra systemd service file
# /usr/lib/systemd/system/cassandra.service
[Unit]
Description=Cassandra
After=network.target
[Service]
PIDFile=/var/run/cassandra/cassandra.pid
User=cassandra
Group=cassandra
@danwit
danwit / passport_node_acl_example.js
Created May 1, 2014 23:23
Authentication and authorization with passportjs + node_acl + mongo + express
/**
* Simple authentication and authorization example with passport, node_acl,
* MongoDB and expressjs
*
* The example shown here uses local userdata and sessions to remember a
* logged in user. Roles are persistent all the way and applied to user
* after logging in.
*
* Usage:
* 1. Start this as server