Skip to content

Instantly share code, notes, and snippets.

@gpxlnx
gpxlnx / gist:124584ac7489f50c2553a9cd901fdb44
Created April 2, 2020 22:02
Comandos Utilizandos no Debian
Adiciona opções que não foram adicionas na instalação. Ex. ambiente gráfico
# tasksel
@gpxlnx
gpxlnx / .vimrc
Last active May 26, 2020 02:27
vimrc
set nu!
syntax on
map q :quit<CR>
set autoindent
set incsearch
set wildmenu
set laststatus=2
set confirm
set title
color murphy
hostname elliot-01
echo elliot-01 > /etc/hostname
bash
curl -fsSL https://get.docker.com | bash
docker version
docker ps
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
apt-get update
apt-get install kubelet kubectl kubeadm
hostname elliot-01
echo elliot-01 > /etc/hostname
bash
curl -fsSL https://get.docker.com | bash
docker version
docker ps
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
apt-get update
apt-get install kubelet kubectl kubeadm
@gpxlnx
gpxlnx / Post-RubyRails.md
Created March 21, 2020 15:33 — forked from lucasnogueira/Post-RubyRails.md
Para aprender Ruby e Rails

É difícil falar de Ruby sem mencionar seu framework web mais famoso, Ruby on Rails. Mas não adianta muito encarar o framework sem um prévio estudo da linguagem (o que de fato já observei acontecer inúmeras vezes). Esse post tem como intuito auxiliar na aprendizagem tanto da linguagem como do framework, para evitar que erros comuns como esse tornem a utilização de ambos um desastre.

Ruby

Ruby é uma linguagem de programação que apareceu para o mundo em 1995, criada por Yukihiro "Matz" Matsumoto. Tem como características o fato de ser uma linguagem de uso geral, com tipagem dinâmica e forte, orientada a objetos e que incorpora diversos paradigmas de programação, como o funcional e o imperativo.

Iniciantes

  • Ruby in Twenty Minutes - É o que o nome diz: um pequeno tutorial que promete não tomar mais do que 20 minutos do seu tempo. Se encarrega de mostrar como baixar e instalar o Ruby. Faz grande uso da IRB (Int
@gpxlnx
gpxlnx / tmux-atalhos.md
Created January 28, 2020 12:18 — forked from aalvesjr/tmux-atalhos.md
[TMUX] Atalhos

quando ler <Prefix> será o padrão Ctrl + b

Window

  • <Prefix> c => para criar uma nova 'window'
  • <Prefix> % => para dividir uma 'window' verticalmente
  • <Prefix> " => para dividir uma 'window' horizontalmente
  • <Prefix> & => para fechar uma 'window'
  • <Prefix> . => move a window para algum indice ainda não utilizado
  • <Prefix> 0 a 9 => abre a 'window' com o numero digitado
  • \ w => abre a 'window' a partir de uma lista
@gpxlnx
gpxlnx / zabbix_migration.md
Created November 7, 2019 10:40 — forked from mwalczak/zabbix_migration.md
Migrating Zabbix with MySQL backend to a new machine

Today I've solved the problem of one server being to slow to handle the growth of my zabbix configuration. I'm using zabbix-server 2.2.2 with MySQL/Debian backend and around 20 zabbix-agents with Debian installed.

Let's say old Zabbix server IP is: A.B.C.D and new is: U.X.Y.Z. The domain name for the instalation will be: http://zbx.newmachine.com

Below you will find all steps to migrate your configuration:

Ensure all agents will accept connections from the new IP Modify each agent configuration file (in debian: /etc/zabbix/zabbix_agentd.conf) and add new IP

@gpxlnx
gpxlnx / chaves.sh
Created October 24, 2019 16:28 — forked from berlotto/chaves.sh
Chaves GPG e SSH
#Chaves GPG (publica e privada) para criptografia e assinatura de emails, arquivos, etc...
#Local padrao das chaves: /home/<username>/.gnupg/
#Criar
~$ gpg --gen-key
#Listar as chaves existentes
~$ gpg --list-keys
#Importar a chave publica de alguem