Skip to content

Instantly share code, notes, and snippets.

View fabiocruzcoelho's full-sized avatar
:octocat:

Fabio Coelho fabiocruzcoelho

:octocat:
View GitHub Profile
@fabiocruzcoelho
fabiocruzcoelho / .zshrc
Last active March 29, 2018 19:05
Exemplo zshrc
# Enviroment variables echo $'\uf303'
export ZSH=/home/fabio/.oh-my-zsh
export SSH_KEY_PATH="~/.ssh/rsa_id"
export LANG=en_US.UTF-8
export TERMINAL=terminator
export PAGER=less
export VISUAL=vim
export TERM="xterm-256color"
# Preferred editor for local and remote sessions
Passos para controlar windows server via ansible - Passos executados no windows server
PS > mkdir C:\work
PS > cd C:\work
PS > Invoke-WebRequest -Uri \
https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 \
-OutFile ConfigureRemotingForAnsible.ps1
PS > powershell -ExecutionPolicy RemoteSigned .\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfileCheck
Passos executados no Linux

Inicia Cluster com volume persistente

$ oc cluster up --routing-suffix=35.184.212.240.nip.io \
--public-hostname=openshift.dominio.com.br \
--host-data-dir=/data/openshift --metrics=true
@fabiocruzcoelho
fabiocruzcoelho / exemplo-git.txt
Last active February 14, 2018 15:48 — forked from wedsonlima/exemplo-git.txt
Exemplos de uso do Git
# Link com comandos (desfazendo as coisas)
https://git-scm.com/book/pt-br/v1/Git-Essencial-Desfazendo-Coisas
# Comandos basicos
git clone git@github.com:wedsonlima/git-presentation.git
git remote -v # pra onde o respositório está apontando
git branch # listar os branchs existentes
git branch tarefa1
git checkout tarefa1
echo 'arquivo 1' > file1.txt
@fabiocruzcoelho
fabiocruzcoelho / git-branch-simplify.md
Created February 14, 2018 15:33 — forked from datagrok/git-branch-simplify.md
How to simplify the graph produced by git log --graph

Ideas for improvements to git log --graph

I will maybe someday get around to dusting off my C and making these changes myself unless someone else does it first.

Make the graph for --topo-order less wiggly

Imagine a long-running development branch periodically merges from master. The git log --graph --all --topo-order is not as simple as it could be, as of git version 1.7.10.4.

It doesn't seem like a big deal in this example, but when you're trying to follow the history trails in ASCII and you've got several different branches displayed at once, it gets difficult quickly.

proxy_cache_valid 1h; # 200, 301 and 302 will be cached.
proxy_cache_use_stale error
timeout
invalid_header
http_500
http_502
http_504
http_404;
proxy_buffering on;
# Size Limits
client_body_buffer_size 200M;
server_names_hash_bucket_size 128;
client_header_buffer_size 128K;
client_max_body_size 200M; # php's upload_max_filesize
large_client_header_buffers 8 8k;
output_buffers 1 32k;
postpone_output 1460;
proxy_buffers 8 16k;
proxy_buffer_size 32k;
@fabiocruzcoelho
fabiocruzcoelho / registry+kubernetes.md
Last active January 19, 2018 18:51
Passos de configuração do registry para um cluster kubernetes
Passos para configurar um resgitry private em um cluster kubernetes
# Gerando os certificados para o registry private
$ openssl genrsa -out "/etc/pki/tls/private/regitry.key" 4096
$ openssl req -x509 -sha512 -nodes -newkey rsa:4096 -days 730 -keyout /etc/pki/tls/private/registry.key \
 -out /etc/pki/tls/certs/registry.crt
$ openssl req -new -x509 -text -key registry.key -out gitlab-registry.cert
# resources.xml windows user local
<node name="app05"
connectionType="WINRM_NATIVE"
node-executor="overthere-winrm"
winrm-password-option="winrmPassword"
winrm-protocol="http"
winrm-auth-type="basic"
username="administrator"
winrm-password-storage-path="keys/admin.password"
<?xml version="1.0" encoding="UTF-8"?>
<project>
<node name="btu-appservers01"
description="Tomcat Applications Server01"
tags=""
hostname="btu-appservers01"
osArch="amd64"
osFamily="unix"
osName="Linux"