Skip to content

Instantly share code, notes, and snippets.

View rmmartins's full-sized avatar

Ricardo Martins rmmartins

View GitHub Profile
@rmmartins
rmmartins / elk-stack-azure.sh
Created October 9, 2018 02:22
scritpt to deply elk stack on Azure
#!/bin/bash
# Define variables
rg="$1"
location="$2"
redisname="$3"
# Validate parameters
if [ "$1" = "" ]; then
echo "Wrong usage! You need inform the parameters."
az group create --name myresourcegroup --location eastus
@rmmartins
rmmartins / 01-create-rg.sh
Last active April 30, 2018 23:38
apache-guacamole
user@mydesktop:~$ az group create \
--name rg-guacamole-demo \
--location eastus
@rmmartins
rmmartins / 1-lvm-config-check-disk.sh
Created March 20, 2018 00:22
linux lvm commands
sudo cfdisk /dev/sdc
sudo pvcreate /dev/sdc1
sudo pvdisplay
sudo vgcreate test_vg /dev/sdc1
sudo vgdisplay
sudo lvcreate -L 5G -n lv01 test_vg
sudo lvdisplay
sudo apt-get install nginx
sudo systemctl enable nginx
@rmmartins
rmmartins / 01-create-rg.sh
Last active November 22, 2017 03:50
collect-info-azure-with-grafana
rmartins@jarvis:~$ az group create --name rg-grafana --location eastus
@rmmartins
rmmartins / 01-list-subs.sh
Last active November 17, 2017 14:03
Get VMs info
az account list
Tecnologia - TI AzureCloud 35e10abf-9270-4hse-85ff-3895b959e820 Enabled
Tecnologia - Arq AzureCloud 83e30abf-2981-4die-88jw-4095b960e790 Enabled
@rmmartins
rmmartins / htaccess.sh
Last active November 1, 2017 18:14
Redirect AzureWebApp
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) https://www.facebook.com/RicardoLab/ [R=301,L]
@rmmartins
rmmartins / 01-install-docker.sh
Last active October 27, 2017 13:30
Tutorial Docker - Parte III
[root@rmartins /]# yum install docker-io
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.nbtelecom.com.br
* epel: mirror.globo.com
* extras: mirror.nbtelecom.com.br
* updates: mirror.nbtelecom.com.br
Resolving Dependencies
--> Running transaction check
@rmmartins
rmmartins / 1-install-docker.sh
Last active October 25, 2017 23:52
Tutorial Docker - Parte II
[root@localhost ~]# yum install docker docker-registry