Skip to content

Instantly share code, notes, and snippets.

View ramcoelho's full-sized avatar

Ricardo Coelho ramcoelho

View GitHub Profile
services:
authentik:
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.10.1}
restart: unless-stopped
command: server
environment:
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_POSTGRESQL__HOST: postgresql
AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik}
AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik}
networks:
proxy:
external: true
services:
proxy:
image: traefik:2.9.1
command:
- --api.insecure=true
- --api.dashboard=true
- --api.debug=true
@ramcoelho
ramcoelho / Dockerfile
Last active February 23, 2021 23:14
nexy/php-fpm:8.0.2
FROM php:8.0.2-fpm
LABEL maintainer="Ricardo Coelho <ricardo@nexy.com.br>"
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
git \
sudo \
libpq-dev \
libicu-dev \
libcurl4-openssl-dev \
@ramcoelho
ramcoelho / docker-api-port.md
Created December 27, 2020 20:52 — forked from styblope/docker-api-port.md
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@ramcoelho
ramcoelho / entrypoint.sh
Created December 19, 2020 17:34
Hadoop: entrypoint.sh run.sh
#!/bin/bash
# Set some sensible defaults
export CORE_CONF_fs_defaultFS=${CORE_CONF_fs_defaultFS:-hdfs://`hostname -f`:8020}
function addProperty() {
local path=$1
local name=$2
local value=$3
$ docker service logs dg-stack_boot-spark-processor
dg-stack_boot-spark-processor.1.t7773pk99g34@ns3170655 |
dg-stack_boot-spark-processor.1.t7773pk99g34@ns3170655 | . ____ _ __ _ _
dg-stack_boot-spark-processor.1.t7773pk99g34@ns3170655 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
dg-stack_boot-spark-processor.1.t7773pk99g34@ns3170655 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
dg-stack_boot-spark-processor.1.t7773pk99g34@ns3170655 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
dg-stack_boot-spark-processor.1.t7773pk99g34@ns3170655 | ' |____| .__|_| |_|_| |_\__, | / / / /
dg-stack_boot-spark-processor.1.t7773pk99g34@ns3170655 | =========|_|==============|___/=/_/_/_/
dg-stack_boot-spark-processor.1.t7773pk99g34@ns3170655 | :: Spring Boot :: (v2.2.5.RELEASE)
dg-stack_boot-spark-processor.1.t7773pk99g34@ns3170655 |
brew install highlight
highlight -O rtf tmp.php --line-numbers --font-size 24 --font Hack --style edit-xcode -W -J 80 -j 3 --src-lang php | pbcopy
@ramcoelho
ramcoelho / senha.html
Last active April 5, 2020 16:45
Jogo "Senha" em Javascript
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>Senha</title>
<style>
body {
font-family: sans-serif;
}
#container {
#!/bin/bash
export TERM=xterm-256color
echo -ne "\n$(tput setaf 3;tput setab 0;tput bold)\n\n"
echo -ne " Este servidor foi criado com base em um modelo.\n"
echo -ne " Para alterar o nome e o IP, utilize o script $(tput setaf 7)reconfigure$(tput setaf 3). \n"
echo -ne "$(tput sgr0)\n\n"
@ramcoelho
ramcoelho / juros_com_aporte.php
Created August 6, 2019 15:58
Cálculo de juros com aportes regulares
<?php
// Configuração
$taxa = 1.01; // 1% ao período
$períodos = 10;
$aporte = 100; // Aporte por período
// Cálculo