View send-myip-gmail.ps1
# Quick powershell script to : | |
# Get the IPv4 and send it using gmail smtp server. Handy when there is no local SMTP server available | |
# !! Warning !! You need to provide your credentials in plain text ... | |
$date = (get-date).ToString() | |
# Get IPv4. Quick filter with -like "1*" to exclude IPv6. There should be a better way to do it ... | |
$IP = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -filter "ipenabled=true" | | |
Where { $_.IPAddress -like "1*"} | | |
Select -ExpandProperty IPAddress | select -First 1 |
View custom-image.json
{ | |
"variables": { | |
"tenancy_ocid": "null", | |
"compartment_ocid": "null", | |
"user_ocid": "null", | |
"fingerprint": "null", | |
"key_file": "null", | |
"region": "null", | |
"base_image_ocid": "null", | |
"image_name": "null", |
View fn-cli_autoconfig.sh
#!/bin/sh | |
# Last update : February, 2020 | |
# Author: cetin.ardal@oracle.com | |
# | |
# This script auto-configure your Fn CLI context on OCI Cloud Shell. | |
# 1. On OCI Console, create an OCIR repository named like your tenant | |
# 2. Then just run this one-liner at the Cloud Shell prompt: | |
# | |
# sh <( curl -L http://xxx.xxx/xxxxxx ) |
View add_oci_user_api_key.sh
#!/bin/sh | |
# Last update : March, 2020 | |
# Author: cetin.ardal | |
# Description: Generate RSA key for OCI API usage and upload it to specified user. | |
COLOR_TITLE="\033[32m" # green | |
COLOR_TITLE1="\033[91m" # light red | |
COLOR_NORMAL="\033[39m" |
View add_oci_user_api_key.tf
/* | |
Last update : March, 2020 | |
Author: cetin.ardal | |
Description: Add OCI API key to specified user. | |
*/ | |
# OCI Home Region | |
provider "oci" { | |
tenancy_ocid = var.tenancy_ocid | |
user_ocid = var.user_ocid |