Skip to content

Instantly share code, notes, and snippets.

View carlessanagustin's full-sized avatar

carles san agustin carlessanagustin

View GitHub Profile
@carlessanagustin
carlessanagustin / win2ix.md
Last active May 4, 2024 10:44
Windows and Unix command line equivalents
Windows command Unix command Notes
set env Set on Windows prints a list of all environment variables. For individual environment variables, set is the same as echo $ on Unix.
set Path export $PATH Print the value of the environment variable using set in Windows.
set PROJ -- result: PROJ=c:\project
echo %PROJ% echo $PROJ result: c:\project

|

DevOps README.md

The Phoenix Project

  • Novel; Not your typical technical book
  • Transformation of Broken Organization towards DevOps Culture
  • Quintessential beginning of a DevOps journey
  • Pros: Easy to digest, can suggest to executives
  • Cons: The implementation details are fuzzy
  • Quip: We all know Brent. Help Brent not be Brent.
@carlessanagustin
carlessanagustin / install_docker_rh.sh
Last active April 28, 2024 11:06
Install Docker Engine & Docker Compose in RedHat based Linux Distribution
#!/usr/bin/env bash
DOCKERCOMPOSE_VERSION=1.25.0
# Docker Engine Community Edition
yum remove \
docker \
docker-client \
docker-client-latest \
@carlessanagustin
carlessanagustin / nested_loop.tf.md
Last active March 13, 2024 12:26
Terraform nested loop
  • In <filename>.tf:
variable "users" {
  default = [
    {
      name       = "user1"
      databases  =  ["db1","db2"]
      password   = "change_me"
      privileges = ["CONNECT","CREATE","TEMPORARY"]
@carlessanagustin
carlessanagustin / functions.tf
Created January 20, 2021 16:34
Terraform functions by example
##--------------------------
## Terraform: Functions ##
##--------------------------
## Open terraform console
terraform console
#######################
## Numeric Functions ##
#######################
@carlessanagustin
carlessanagustin / ip_address.md
Last active February 5, 2024 10:42
SHELL: Get IP address from command line

Public

curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'

curl ipinfo.io/ip

from Ubuntu

ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/'

@carlessanagustin
carlessanagustin / lists-dictionary.yml.md
Last active January 22, 2024 21:55
Lists & Dictionary YAML Syntax by example
@carlessanagustin
carlessanagustin / pipeline.yaml
Created September 4, 2020 08:58
Azure Devops Pipeline predefined variables print
trigger:
branches:
include:
- master
- develop
- refs/tags/*
pool:
vmImage: 'ubuntu-18.04'
@carlessanagustin
carlessanagustin / VAGRANT-Cheat-Sheet.md
Last active November 7, 2023 20:27
This is a VAGRANT cheat sheet

Vagrant Cheat Sheet

add image

local

$ vagrant box add {title} {url}
$ vagrant init {title}
$ vagrant up