Skip to content

Instantly share code, notes, and snippets.

View strund3r's full-sized avatar

Franzwagner Ternus strund3r

View GitHub Profile
https://docs.google.com/document/d/1ez-CoBwxVhxPodNQkxvkipEYwyixrpAHavwipovwf8k/edit
https://docs.google.com/document/d/1Z35otIj_LK9Sq8xSXku8Fba6PdhYZbgncBHWkVivL6k/edit
# Operations - Beginner
## Deploying a local registry
Erro: Get https://localhost:5000/v1/_ping: http: server gave HTTP response to HTTPS client
Solução: 1. Criar ou modificar /etc/docker/daemon.json
{ "insecure-registries":["localhost:5000"] }
@strund3r
strund3r / .bashrc
Last active June 20, 2017 15:02
change color bash
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@strund3r
strund3r / docker_swarm_deploy_script.sh
Last active July 11, 2017 13:40
Self-explaining title (using IP) (Docker 4 AWS)
#!/bin/bash
################ VARIABLES ################
# Image Repository #
image_name="example/example" #
# #
# .pem key's location #
ssh_key_loc="/home/example/example.pem" #
# #
# Manager's IP (IPv4 Public IP) #
#!/bin/bash
clear
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
function version_le() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" == "$1"; }
function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; }
printf "\n\n"
# System
alias update='sudo apt-get update'
alias upgrade='update; sudo apt-get -y upgrade'
alias install='sudo apt-get -y install'
alias shutdown='sudo /sbin/shutdown -P now'
alias kabum='init 0'
alias checkversions='~/check_versions.sh'
# Docker
alias docker-ip="docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'"
@strund3r
strund3r / docker_swarm_deploy_script.sh
Last active March 26, 2019 19:32
Docker Swarm deploy script (using AWS CLI) (Docker 4 AWS)
#!/bin/bash
################ VARIABLES ################
# Image Repository #
image_name="example/example" #
# #
# .pem key's location #
ssh_key_loc="/home/example/example.pem" #
################ VARIABLES ################
#!/bin/bash
# carregando configurações via params
for i in $*
do
if [[ "$i" == '-y' || "$i" == '-Y' ]] ; then
all_alowed=true
fi
done
#!/bin/bash
# Validar sistema operacional
CHECK=`cat /etc/debian_version`
if [ -z "$CHECK" ]
then
OS=centos
GROUP=wheel
LIB=libexec
else

Keybase proof

I hereby claim:

  • I am strund3r on github.
  • I am strund3r (https://keybase.io/strund3r) on keybase.
  • I have a public key whose fingerprint is 7AC8 0C68 162E 297A 6659 D121 F9A0 082D FEF5 B4E3

To claim this, I am signing this object:

# HashiCorp Learn
https://learn.hashicorp.com/
#