Skip to content

Instantly share code, notes, and snippets.

View snappytux's full-sized avatar
🐔
Friends Not Food

iChamp snappytux

🐔
Friends Not Food
View GitHub Profile
@nknapp
nknapp / Dockerfile
Created October 30, 2016 20:15
Traefik setup as reverse-proxy with docker and letsencrypt
FROM traefik:camembert
ADD traefik.toml .
EXPOSE 80
EXPOSE 8080
EXPOSE 443
@evertrol
evertrol / Makefiles.md
Last active May 12, 2025 16:52
Makefile cheat sheet

Makefile cheat sheet

Mostly geared towards GNU make

I've used ->| to indicate a tab character, as it's clearer to read than

  • Set a target, its dependencies and the commands to execute in order
target: [dependencies]
->| 
@hermanbanken
hermanbanken / Dockerfile
Last active April 15, 2025 21:49
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@saniaky
saniaky / aws-s3-policy.json
Last active January 14, 2022 01:06
Backup and restore a ALL MySQL databases from a running Docker MySQL container.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowPolicy",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:ListBucket"
@segunadebayo
segunadebayo / NextGA.js
Created August 23, 2019 13:03
Add Google Analytics to NextJS
import NextHead from 'next/head'
import React from 'react'
import ReactGA from 'react-ga'
import Router from 'next/router'
// GA Tracking Id
const gaTrackingId = '[GOOGLE ANALYTICS TRACKING ID GOES HERE]'
Router.onRouteChangeComplete = () => {
@R0GGER
R0GGER / _hsts.conf
Last active March 15, 2025 19:32
Workaround - Security Headers @ NGINX Proxy Manager
{% if certificate and certificate_id > 0 -%}
{% if ssl_forced == 1 or ssl_forced == true %}
{% if hsts_enabled == 1 or hsts_enabled == true %}
# HSTS (ngx_http_headers_module is required) (63072000 seconds = 2 years)
add_header Strict-Transport-Security "max-age=63072000;{% if hsts_subdomains == 1 or hsts_subdomains == true -%} includeSubDomains;{% endif %} preload" always;
add_header Referrer-Policy strict-origin-when-cross-origin;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Frame-Options SAMEORIGIN;
add_header Content-Security-Policy upgrade-insecure-requests;
@jpcranford
jpcranford / avrae cheatsheet.md
Last active May 4, 2025 03:45
A handy cheatsheet and tutorial for using the Discord bot Avrae. https://avrae.io

Roll some dice: !roll 1d12+3 adv


A linked character sheet is needed to run commands in the following table.

Action Avrae command
Ability check !check perception
Initiative roll !check init