Skip to content

Instantly share code, notes, and snippets.

View pascalandy's full-sized avatar
:octocat:
Rocking the git

Pascal Andy pascalandy

:octocat:
Rocking the git
View GitHub Profile
@pascalandy
pascalandy / security_headers.conf
Created January 6, 2017 22:43 — forked from Yinchie/security_headers.conf
Only applying this config to the main website "location" and not on static assets. Saves bandwidth, since the headers only have an impact during the website load.
more_set_headers "X-UA-Compatible: IE=Edge";
more_set_headers "X-XSS-Protection: 1; mode=block";
more_set_headers "Strict-Transport-Security: max-age=63072000; includeSubDomains; preload";
more_set_headers "X-Frame-Options: SAMEORIGIN";
more_set_headers "X-Content-Type-Options: nosniff";
more_set_headers "Content-Security-Policy: default-src 'self'; script-src 'self' data: gist.github.com embedr.flickr.com widgets.flickr.com; style-src 'self' 'unsafe-inline' data: assets-cdn.github.com; img-src 'self' data: www.gravatar.com farm2.staticflickr.com; font-src 'self' data:; connect-src 'self' embedr.flickr.com geo.query.yahoo.com; media-src 'none'; object-src 'self'; child-src 'self' www.youtube.com gaming.youtube.com player.twitch.tv; form-action 'self'; upgrade-insecure-requests; block-all-mixed-content; reflected-xss block; base-uri https://www.itchy.nl; manifest-src 'self'; disown-opener; referrer no-referrer-when-downgrade;";
# Let's Encrypt Authority X3, RSA, ECDSA, CSR, backup CSR
@pascalandy
pascalandy / nginx.conf
Created January 6, 2017 22:43 — forked from Yinchie/nginx.conf
nginx.conf (gist colors) = www.itchy.nl.conf - my optimized Nginx configuration for ghost blog
# main server
server {
listen 443 default_server fastopen=256 ssl http2;
listen [::]:443 fastopen=256 ssl http2 ipv6only=on;
charset utf-8;
server_name www.itchy.nl;
include /etc/nginx/includes/tls.conf;
# modify versions being displayed in http header.
more_set_headers "Server: www.itchy.nl";
@pascalandy
pascalandy / Dockerfile
Created January 2, 2017 23:54
phusion-utility
# phusion-baseimage
# https://hub.docker.com/r/phusion/baseimage/tags/
# To make your builds reproducible, make
# sure you lock down to a specific version, not to `latest`!
# See https://github.com/phusion/baseimage-docker/blob/master/Changelog.md for
# a list of version numbers. More details: https://goo.gl/IKMdhi # FROM debian (older image)
FROM phusion/baseimage:0.9.19
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
# #
# >>> Bash Guard
#
# Inject this into the top of your bash scripts to ensure
# that the script is running with in bash rather than sh.
# This is useful because bash and sh often require different
# syntax. It won't force the user to re-execute the script
# properly, but just re-execute itself as it was supposed to
# be done in the first place.
@pascalandy
pascalandy / my-custom.cnf
Last active November 20, 2022 09:30
This mysql config is made to run within the official mysql container.
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
#
# _dockerfile/mysql/conf.d/my.cnf
# Last update: 2017-01-05_10h05
#
# This mysql config is made to run within the official mysql container.
# https://hub.docker.com/_/mysql/
#
# Inspired by:
# https://www.percona.com/blog/2016/10/12/mysql-5-7-performance-tuning-immediately-after-installation/
# updated this 2017-05-13_13h06
➜ _infra git:(1.9.22) ✗ scw images
REPOSITORY TAG IMAGE ID CREATED REGION ARCH
Ubuntu_Yakkety latest d53fafe4 6 months [ams1 par1] [arm x86_64]
Mattermost latest 0644b229 10 months [ams1 par1] [x86_64]
Ubuntu_Xenial latest 656de689 12 months [ams1 par1] [arm arm64 x86_64]
Jenkins_Slave latest 181e1ed0 14 months [ams1 par1] [arm]
Centos latest 24d33e48 14 months [ams1 par1] [arm x86_64]
@pascalandy
pascalandy / install-docker-test-or-experimental.md
Last active November 21, 2016 23:46
install-docker-test-or-experimental.md
#!/bin/sh
set -e
#
# source - https://raw.githubusercontent.com/docker/docker/master/hack/install.sh
# See this gist as a backup
##
# This script is meant for quick & easy install via:
# 'curl -sSL https://get.docker.com/ | sh'
# or:
# 'wget -qO- https://get.docker.com/ | sh'
@pascalandy
pascalandy / generate-password.sh
Last active May 21, 2020 22:59
A solid bash script to generate password
#############################################################################
# generate-password.sh
# Source: https://gist.github.com/pascalandy/e08c25c41d05c12f7a7cd89dcac48d33
# License > https://github.com/pascalandy/GNU-GENERAL-PUBLIC-LICENSE/blob/master/README.md
#############################################################################
#
# Here is my crazy ass bash script 🎰 password generator 🎰. Works on Mac and Linux.
# This generates two random passwords at a time:
# The first with some spaces and the other one without spaces.
#
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder;