Skip to content

Instantly share code, notes, and snippets.

View hugoeanogueira's full-sized avatar

Hugo Nogueira hugoeanogueira

View GitHub Profile
server {
listen 80;
listen [::]:80;
server_name yourserver.com;
root /path/to/your/htdocs;
error_page 404 /404.html
index index.html;
# Generate SSL Certificate for dev
export DOMAIN="example.dev"
export PASSPHRASE=$(head -c 500 /dev/urandom | tr -dc a-z0-9A-Z | head -c 128; echo)
export SUBJ="
C=PT
ST=Aveiro
O=Example Organization
localityName=Aveiro
commonName=$DOMAIN
@hugoeanogueira
hugoeanogueira / nginx.conf
Created October 14, 2015 14:15 — 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
@hugoeanogueira
hugoeanogueira / douchebag-vertical-align.css
Created November 9, 2016 10:48 — forked from colintoh/douchebag-vertical-align.css
douchebag way of vertical alignment
.element {
position: relative;
top: 50%;
transform: translateY(-50%);
}
@hugoeanogueira
hugoeanogueira / minikube.md
Created February 1, 2017 12:10 — forked from codesword/minikube.md
Installing minikube using xhyve driver

###Install docker-machine-driver-xhyve docker-machine-driver-xhyve is a docker machine driver plugin for xhyve native OS X Hypervisor. xhyve is a lightweight OS X virtualization solution. In my opinion, it's a far better option than virtualbox for running minikube. ####Brew On MacOS sierra, download latest using

brew install docker-machine-driver-xhyve --HEAD
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
@hugoeanogueira
hugoeanogueira / gcloud_ssh_complete
Created November 13, 2017 14:45 — forked from miquelbar/gcloud_ssh_complete
Gcloud ssh autocomplete
#!/bin/bash
export _SSH_COMPLETE_F_CACHE="/tmp/_ssh_complete"
export _SSH_COMPLETE_HOSTS=""
[[ ! -f "$_SSH_COMPLETE_F_CACHE" ]] && touch "$_SSH_COMPLETE_F_CACHE"
_ssh_complete() {
if [ -z "$_SSH_COMPLETE_HOSTS" ]; then