In the user-managed OCI compartments, the compute instances are behind a proxy. To use the proxy, set the following environment variables:
export http_proxy=www-proxy-ash7.us.oracle.com:80
export https_proxy=www-proxy-ash7.us.oracle.com:80
or
# Create new virtual environment | |
# cd VirtualEnvironments | |
# python3 -m venv mycoolapp | |
# $ . venv mycoolapp | |
source ~/VirtualEnvironments/$1/bin/activate |
import random | |
wins=[] | |
losses=0 | |
nbr_games=5 | |
for gameidx in range(nbr_games): | |
wallet=maxwallet=100 | |
limit=200 | |
bet=1 | |
# print(f"\n\nNew game {gameidx}") |
In the user-managed OCI compartments, the compute instances are behind a proxy. To use the proxy, set the following environment variables:
export http_proxy=www-proxy-ash7.us.oracle.com:80
export https_proxy=www-proxy-ash7.us.oracle.com:80
or
https://tecadmin.net/allow-http-service-firewalld/ Written by Rahul, Updated on March 23, 2020
FirewallD is a firewall management solution for most of the Linux distributions. You can directly allow/deny ports using the service name with Firewalld. When used services name to allow/deny, it uses /etc/services file to find corresponding port of the service. This tutorial help you to open port for HTTP (80) and HTTPS (443) services via the firewall-cmd command line.
Allow HTTP/s in Firewalld
As sysdba in CDB:
CREATE PLUGGABLE DATABASE TESTPDB ADMIN USER test_admin IDENTIFIED BY test_admin
STORAGE (MAXSIZE 2G)
DEFAULT TABLESPACE USERS
DATAFILE '+DATA' SIZE 250M AUTOEXTEND ON;
ALTER PLUGGABLE DATABASE TESTPDB OPEN READ WRITE;
#upload | |
curl -H "X-JFrog-Art-Api:${XGBU_ARTIFACTORY_API_KEY}" \ | |
-T ~/Downloads/sqlcl-21.2.2.223.0914.zip \ | |
"https://artifacthub-iad.oci.oraclecorp.com/artifactory/xgbu-ace-dev/oci_build/sqlcl-21.2.2.223.0914.zip" | |
#download | |
curl -H "X-JFrog-Art-Api:${XGBU_ARTIFACTORY_API_KEY}" \ | |
-O "https://artifacthub-iad.oci.oraclecorp.com/artifactory/xgbu-ace-dev/oci_build/sqlcl-21.2.2.223.0914.zip" |
export VAULT_OCID=ocid1.vault.oc1.iad.xxx # Edit as needed | |
export COMPARTMENT_OCID=ocid1.compartment.oc1..xxx # Edit as needed | |
export KEY_OCID=ocid1.key.oc1.iad.xxx # Edit as needed | |
export PASSWORD=$(openssl rand -base64 32 | base64) # See http://bit.ly/gen-pwd | |
export SECRET_NAME="my_secret-demo" | |
export VAULT_USER_PROFILE="VAULT_USER" # OCI CLI Profile | |
# See a list of vaults in a compartment | |
oci kms management vault list \ | |
--profile $VAULT_USER_PROFILE \ |
#!/usr/bin/env python3 | |
from sys import argv | |
"""Example for using a dictionary to map function calls from | |
argument variables. | |
Usage: | |
fn_map.py this foo | |
fn_map.py that '{"one":"foo","two":"bar"}' | |
fn_map.py other baz |