Skip to content

Instantly share code, notes, and snippets.

View lgelfan's full-sized avatar
💭
Float'n

lars gelfan lgelfan

💭
Float'n
View GitHub Profile
@lgelfan
lgelfan / pre-commit
Created March 25, 2017 00:38 — forked from eddywashere/pre-commit
Git hook that prevents commits to master
#!/bin/sh
#
# Git hook that prevents commits to master
# use --no-verify to bypass this hook
# ex: git commit -m "init commit" --no-verify
branch=`git symbolic-ref HEAD`
if [ "$branch" = "refs/heads/master" ]; then
echo "Direct commits to the branch master are not allowed"
exit 1
@lgelfan
lgelfan / nginx.conf
Created November 16, 2016 06:45 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which