This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace package oci_metrics as | |
-- | |
-- ╔═╗┌─┐┌┬┐┬ ┬┌─┐ ╔═╗┌┬┐┌─┐┌─┐┌─┐ | |
-- ╚═╗├┤ │ │ │├─┘ ╚═╗ │ ├┤ ├─┘└─┐ | |
-- ╚═╝└─┘ ┴ └─┘┴ ╚═╝ ┴ └─┘┴ └─┘ | |
-- | |
-- Current PDB's OCID | |
-- select json_value(cloud_identity , '$.DATABASE_OCID') from v$pdbs | |
-- | |
-- Crate Dynamic Group "klrice-testing" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set serveroutput on | |
DECLARE | |
credential_name varchar2(200) := 'OCI$RESOURCE_PRINCIPAL'; | |
region varchar2(200) := 'us-phoenix-1'; | |
base_uri varchar2(200) := 'https://telemetry-ingestion.' || region|| '.oraclecloud.com/20180401/metrics'; | |
resp dbms_cloud_types.RESP; | |
BEGIN | |
-- Current PDB's OCID | |
-- select json_value(cloud_identity , '$.DATABASE_OCID') from v$pdbs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set load scan_rows 10000 | |
drop table strava_activities; | |
drop table strava_applications; | |
drop table strava_bikes; | |
drop table strava_blocks; | |
drop table strava_clubs; | |
drop table strava_comments; | |
drop table strava_components; | |
drop table strava_connected_apps; | |
drop table strava_contacts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OCIPROFILE="MYPROFILE" | |
DBOCID="ocid1.autonomousdatabase.oc1.phx.anyhqljrcsc5xxqnxxxxxxxxxxxxxxxxxxxxxxxxkulv5ipmbqiq" | |
REGION="us-phoenix-1" | |
# | |
# GET my IP Address | |
# | |
# Example : "1.2.3.4" | |
CURRENT_IP=$(oci raw-request --profile $OCIPROFILE --target-uri https://database.${REGION}.oraclecloud.com/20160918/autonomousDatabases/capabilities --http-method GET | jq ".data.clientIpAddress") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const common = require("oci-common"); | |
const databasetools = require("oci-databasetools"); | |
const secrets = require("oci-secrets"); | |
const core = require("oci-core"); | |
const fs = require("fs"); | |
const oracledb = require('oracledb'); | |
// | |
// Configure Instant Client | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.krisice; | |
import com.oracle.bmc.http.signing.RequestSigningFilter; | |
import javax.ws.rs.client.*; | |
import javax.ws.rs.core.MediaType; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.Reader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# MAVEN DEPS | |
declare -a array=("https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api" | |
"https://repo1.maven.org/maven2/org/graalvm/regex/regex" | |
"https://repo1.maven.org/maven2/com/ibm/icu/icu4j" | |
"https://repo1.maven.org/maven2/org/graalvm/sdk/graal-sdk" | |
"https://repo1.maven.org/maven2/org/graalvm/js/js" | |
"https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with colors as ( | |
select 'black' value from dual | |
union all | |
select 'green' from dual | |
union all | |
select 'yellow' from dual | |
union all | |
select 'blue' from dual | |
union all | |
select 'magenta' from dual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set scan off | |
set define off | |
script sqlid.js | |
set statusbar add sqlid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set scan off | |
set define off | |
script | |
var StatusBarComponent = Java.type("oracle.dbtools.raptor.console.StatusBarComponent"); | |
var component = new StatusBarComponent() { | |
getName: function() { | |
return "cmdstatus"; | |
}, | |
getDescription: function() { |