Skip to content

Instantly share code, notes, and snippets.

View ramcoelho's full-sized avatar

Ricardo Coelho ramcoelho

View GitHub Profile
@ramcoelho
ramcoelho / regras_phpmaranhao.md
Last active February 8, 2018 21:28
PHP Maranhão: Regras do Grupo

Regras do grupo

Para tópicos

Antes de abrir um novo tópico verifique se já não existe um outro tópico aberto com o mesmo assunto/dúvida. Verifique antes também possíveis soluções para as suas dúvidas no Google.

<center> <table border="0" width="80%" cellspacing="1">
<tr>
<td rowspan="3">
</td>
<td><font face="Verdana" size="2"><b>Verificar arquivos necessários para
a rotina batch:<br>
</b>Os arquivos necessários para a execução de funções da rotina de abertura
devem estar no diretório Integra do servidor. Verifique se todos
encontram-se no servidor local conforme tabela abaixo:</font></td>
</tr>
Verifying that +rcoelho is my blockchain ID. https://onename.com/rcoelho
@ramcoelho
ramcoelho / ubuntu_install_docker_and_docker_compose.txt
Last active December 29, 2020 13:24
Install Docker & Docker Compose on Ubuntu
#!/bin/bash
sudo apt remove -y docker docker-engine docker.io containerd runc
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# For Ubuntu 20.10:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
@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
#!/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 / 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 {
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
$ 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 |
@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