Skip to content

Instantly share code, notes, and snippets.

View bgalvao's full-sized avatar
💻

Bernardo bgalvao

💻
View GitHub Profile
@smanierre
smanierre / authelia.yml
Created December 16, 2020 14:36
Traefik + Authelia
version: "3.3"
services:
authelia:
image: authelia/authelia:4.20.0
volumes:
- /home/username/authelia:/config
networks:
- traefik-public
deploy:
placement:
@DannyQuah
DannyQuah / 2020.08-D.Quah-Pandoc-Workflow-Markdown-PDF.md
Last active April 8, 2024 12:57
My Pandoc Markdown-PDF Workflow for Routine, Not Especially Technical Writing

My Pandoc Markdown-PDF Workflow for Routine, Not Especially Technical, Writing

by Danny Quah, Aug 2020 (revised Jan 2022)

TL;DR: I write technical articles in LaTeX. But shorter, non-technical writings are easier to do in Markdown. How do I produce PDF from Markdown documents? Answer: provide YAML information in the Markdown; run Pandoc (typically through a Makefile or Atom's Markdown Preview Enhanced). To make all this work, some adjustment is needed in Pandoc options and template files.

Pandoc is a filter that takes a written document in a particular format, and produces a version of that same document in yet a different format. I use Pandoc primarily to transform Markdown documents to PDF, but I also draw on Pandoc to convert Word or ODT documents to Markdown. And vice versa.

Available official Pandoc documentation is voluminous. So as a matter of logic the knowledge to generate PDF from Markdown, to the user's desired degree of control, is already extant, out there somewhere. But a user j

@allout58
allout58 / docker-compose.yaml
Last active December 29, 2021 12:01
Example Traefik and Authelia integration
version: '3.7'
services:
traefik:
image: traefik:v2.2
container_name: traefik
labels:
- 'traefik.enable=true'
# TODO: Change the Domain
- 'traefik.http.routers.api.rule=Host(`traefik.example.com`)'
- 'traefik.http.routers.api.entrypoints=https'
@james-d-elliott
james-d-elliott / configuration.yml
Last active December 29, 2021 12:02
Authelia Sample Configuration
###############################################################
# Authelia minimal configuration #
###############################################################
port: 9091
logs_level: info
jwt_secret: insecure_secret
authentication_backend:
file:
path: /etc/authelia/users.yml
totp:
@bvis
bvis / README.md
Last active April 12, 2024 04:21
Docker Env Vars expanded with secrets content

Variables by Secrets

Sample script that allows you to define as environment variables the name of the docker secret that contains the secret value. It will be in charge of analyze all the environment variables searching for the placeholder to substitute the variable value by the secret.

Usage

You can define the next environment variables:

@flbuddymooreiv
flbuddymooreiv / passgitgpg.md
Last active April 15, 2024 00:08
Setting up pass on git with a gpg key

The following shell transcript shows how to:

  • Create a GPG key
  • Create a pass database
  • Add git support to the pass database
  • Create a remote git repository
  • Push the pass database to the remote git repository
  • Fetch and display your passwords from another host

It is assumed that the pass package has been installed on both the first and second computers.

@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
For each pixel on the screen do:
{
x0 = scaled x co-ordinate of pixel (must be scaled to lie somewhere in the interval (-2.5 to 1)
y0 = scaled y co-ordinate of pixel (must be scaled to lie somewhere in the interval (-1, 1)
ESCAPE = 2*2
x = 0
y = 0
iteration = 0