Skip to content

Instantly share code, notes, and snippets.

Avatar

Louis Mayorga lmayorga1980

  • LM3CORP
  • Nassau Bahamas
View GitHub Profile
@lmayorga1980
lmayorga1980 / Ansible-Inventory.md
Last active Feb 19, 2020
Terraform 0.11 and 0.12 Ansible Inventory Generation
View Ansible-Inventory.md

Terraform 0.11.x

data "template_file" "ansible_inventory" {
  template = "${file("ansible/hosts.cfg.tpl")}"

  vars = {
    docker_core_hosts  = openstack_compute_instance_v2.core_docker.*.access_ip_v4
  }
}
@lmayorga1980
lmayorga1980 / zsh-powerline.xml
Created Feb 13, 2020
My ZSH Powerline Terminal OSX Catalina
View zsh-powerline.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjMwNTg4MjM1MjkgMC4zMDU4ODIzNTI5IDAuMzA1ODgyMzUyOQAQAoAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
@lmayorga1980
lmayorga1980 / zsh-powerline.xml
Created Feb 13, 2020
My ZSH Powerline Terminal OSX Catalina
View zsh-powerline.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjMwNTg4MjM1MjkgMC4zMDU4ODIzNTI5IDAuMzA1ODgyMzUyOQAQAoAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
View click_subcommand.py
import click
@click.group()
def account():
pass
@account.command()
def list():
click.echo('This is the list command')
@lmayorga1980
lmayorga1980 / scan-ports.py
Created Jan 8, 2020
Scan Ports with NMap
View scan-ports.py
`nmap -p0- -v -A -T4 <ip>`
View ami-cleanup.py
from __future__ import print_function
import json
import boto3
import logging
from datetime import datetime, timedelta
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def get_outdated_images():
View packer-1.4.5-parallels.sh
[15:36:00] $ PACKER_LOG=debug packer build -only=parallels-iso win2019-vagrant.json
2019/11/13 15:39:45 [INFO] Packer version: 1.4.5
2019/11/13 15:39:45 Packer Target OS/Arch: darwin amd64
2019/11/13 15:39:45 Built with Go Version: go1.13.4
2019/11/13 15:39:45 Detected home directory from env var: /Users/lmayorga
2019/11/13 15:39:45 Using internal plugin for alicloud-ecs
2019/11/13 15:39:45 Using internal plugin for amazon-ebsvolume
2019/11/13 15:39:45 Using internal plugin for azure-arm
2019/11/13 15:39:45 Using internal plugin for parallels-pvm
2019/11/13 15:39:45 Using internal plugin for virtualbox-iso
@lmayorga1980
lmayorga1980 / ADFS-RESPONSE.md
Created Oct 8, 2019
aws-adfs reponse with AzureMFA
View ADFS-RESPONSE.md
<html lang="en">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=10.000"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
        <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
        <meta http-equiv="cache-control" content="no-cache,no-store"/>
        <meta http-equiv="pragma" content="no-cache"/>
        <meta http-equiv="expires" content="-1"/>
        <meta name='mswebdialog-title' content='Connecting to ADFS'/>
@lmayorga1980
lmayorga1980 / kitchen-docker-windows-inspec-1.md
Last active Jun 18, 2019
Kitchen Docker Windows Inspec
View kitchen-docker-windows-inspec-1.md

error

D, [2019-06-17T18:05:02.138580 #4032] DEBUG -- Kitchen: Class: Kitchen::ActionFailed
D, [2019-06-17T18:05:02.141131 #4032] DEBUG -- Kitchen: Message: Failed to complete #verify action: [getaddrinfo: No such host is known.  (SocketError)]
D, [2019-06-17T18:05:02.143625 #4032] DEBUG -- Kitchen: ----------------------

Gemfile

@lmayorga1980
lmayorga1980 / kitchen-docker-windows-inspec.md
Last active Jun 14, 2019
Kitchen-Docker-Windows Test Windows 2019 Core
View kitchen-docker-windows-inspec.md
source 'https://rubygems.org'

gem "kitchen-docker", github: "jeffreycoe/kitchen-docker", branch: "windows-support"
gem 'test-kitchen'
gem 'kitchen-inspec'
gem 'inspec'
You can’t perform that action at this time.