Skip to content

Instantly share code, notes, and snippets.

View lucassrg's full-sized avatar

Lucas Gomes lucassrg

View GitHub Profile
@lucassrg
lucassrg / Path
Last active June 1, 2016 17:46
Error processing QemuArggs: No version found:
PS C:\Users\lgomes> $Env:Path
%SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Fil
es (x86)\Common Files\Microsoft Shared\Windows Live;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C
:\windows\System32\Wbem;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow6
4;C:\Program Files (x86)\Plantronics\PlantronicsURE\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Intel\W
iFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Prog
ram Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;D:\Tools\nodejs\;D:\Tools\Git\cmd;C:\Program Files (x86)\Sennheiser\Softpho
neSDK\;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Wi
Fi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\lgomes\AppData\Roaming\npm;D:\Tools\gradle-2.11\bin
;D:\Tools\packer_0.10.1;D:
@lucassrg
lucassrg / opc-userdata-hello-win2012.ps1
Last active July 18, 2017 23:10
Oracle Compute Cloud Userdata Bootstrap file
#Powershell script
#Set-ExecutionPolicy RemoteSigned
Set-ExecutionPolicy Unrestricted
#Set-ExecutionPolicy -executionpolicy remotesigned -force
New-Item C:\helloworld.txt -ItemType File -Value "Hello, world!"
@lucassrg
lucassrg / instance.tf
Created October 19, 2017 21:49
Terraform Instance count for OCI provider
#OCI Environment variables
variable "tenancy_ocid" {}
variable "user_ocid" {}
variable "fingerprint" {}
variable "compartment_ocid" {}
variable "region" {}
variable "ssh_public_key_path" {}
variable "ssh_private_key_path" {}
variable "availability_domain" {}
variable "instance_shape" {}
@lucassrg
lucassrg / main.tf
Created October 20, 2017 04:54
Terraform template vcn
variable "tenancy_ocid" {}
variable "user_ocid" {}
variable "fingerprint" {}
variable "compartment_ocid" {}
variable "region" {}
variable "ssh_public_key_path" {}
variable "ssh_private_key_path" {}
variable "availability_domain" {}
variable "instance_shape" {}
@lucassrg
lucassrg / ol_7-install_kvm.sh
Last active June 1, 2018 18:13
Oracle Linux 7.x - Install KVM server with GUI support via VNC
#!/bin/bash
##Install KVM, Dependencies & utils
yum -y install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer oci-utils
yum groupinstall "Server with GUI" -y
##Install VNC Server
yum install xorg-x11-xauth xorg-x11-fonts-* xorg-x11-utils tigervnc-server mesa-libGL mesa-libEGL -y
@lucassrg
lucassrg / install_apache.sh
Created March 20, 2018 06:13
Install Apache on OL7.x
#!/bin/bash
yum install -y httpd
systemctl enable httpd.service
systemctl start httpd.service
echo '<html><head></head><body><pre><code>' > /var/www/html/index.html
hostname >> /var/www/html/index.html
echo '' >> /var/www/html/index.html
@lucassrg
lucassrg / ngnix_cloud-init-userdata.sh
Created May 29, 2018 18:47
Sample Cloud-init userdata script for setting up NGNIX with SSL Certificate
#!/bin/bash
###############################
# Input variables #
##############################
DOMAIN=mysite.com
CERTS_ROOT_DIR=/etc/ssl
#Zip file containing the SSL certificate bundle
# Content of the zip file:
@lucassrg
lucassrg / ol_7-install_oci_cli.sh
Created October 25, 2018 08:18
Install OCI CLI on OL 7
#!/bin/bash
sudo yum -y install yum-utils
sudo yum-config-manager --enable ol7_developer
sudo yum -y install python-oci-sdk python-oci-cli
@lucassrg
lucassrg / openssl_commands.md
Created September 23, 2019 17:22 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@lucassrg
lucassrg / mp_subscription.py
Created March 13, 2020 05:17
subscribe to marketplace listing
# coding: utf-8
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
# This script subscribes to the default package of a Marketplace listing by accepting all terms and conditions and list all subscriptions
#
#
#
#
import oci