Skip to content

Instantly share code, notes, and snippets.

View germanviscuso's full-sized avatar
🏠
Working from home

German Viscuso germanviscuso

🏠
Working from home
View GitHub Profile

DBMS_METRIC v0.3 — Complete User Guide

Publish any SQL query as a custom OCI Monitoring metric, from inside Oracle Autonomous AI Database.

You register a SELECT. A scheduler job inside the database turns its rows into OCI PostMetricData JSON every 60 seconds and posts it, signed, to the OCI telemetry ingestion endpoint. The result is a first-class OCI metric: it charts in Metrics Explorer, alarms through OCI Monitoring, exports through Service Connector Hub, and is pulled by any third-party observability tool that reads the OCI Monitoring API.

No agent. No compute instance. No ORDS. Nothing to operate outside the database.

This guide assumes nothing. It covers creating the OCI user, group, API key and policy from scratch, installing the package, and every command you will ever run against it. If you already have some of this, skip ahead using the contents.

@germanviscuso
germanviscuso / demo.sql
Last active January 28, 2026 11:50
Code for "Secure and serverless GenAI Apps on AWS with Oracle AI Database 26ai"
-- Create credential
BEGIN
DBMS_CLOUD.CREATE_CREDENTIAL(
credential_name => 'OCI_GENAI_CRED',
user_ocid => 'ocid1.user.oc1..xxxxxxxx',
tenancy_ocid => 'ocid1.tenancy.oc1..xxxxxxxx',
private_key => '-----BEGIN RSA PRIVATE KEY-----
xxxxxxxxxxxxxxxxxxxxxxxx
-----END RSA PRIVATE KEY-----',
@germanviscuso
germanviscuso / lambda_function.py
Last active December 10, 2025 18:43
StreamFlix
import sys
import logging
import pymysql
import json
import os
import boto3
import datetime
import base64
import hashlib
import hmac
@germanviscuso
germanviscuso / Dockerfile_broker
Last active December 2, 2025 11:28
Lab k8s cluster
# Usamos Ubuntu 20.04 para asegurar compatibilidad con las librerías del binario
FROM ubuntu:20.04
# Instalamos dependencias básicas y limpiamos caché para reducir peso
RUN apt-get update && \
apt-get install -y software-properties-common && \
rm -rf /var/lib/apt/lists/*
# Copiamos el binario a la raíz del contenedor
COPY brokerFileManager /brokerFileManager
@germanviscuso
germanviscuso / CommsXRGrabListener.cs
Created April 8, 2025 22:54
Ejemplo de script que usa CommsManager para anexar a un objeto grabbable (XRGrabInteractable)
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
namespace CignvsLab
{
public class CommsXRGrabListener : MonoBehaviour
{
private CommsManager commsManager;
private string grabTopic = "xr/grab";
private string releaseTopic = "xr/release";
SELECT METRIC_NAME, VALUE, METRIC_UNIT
FROM ACD_V$SYSMETRIC
WHERE METRIC_NAME IN ('Database CPU Time Ratio', 'Database Wait Time Ratio');
@germanviscuso
germanviscuso / Cargo.toml
Last active November 3, 2023 12:35
Code for Sibyl to ADB
[package]
name = "adb_rust_s"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
sibyl = {version = "0.6.16", features = ["blocking"]}
@germanviscuso
germanviscuso / Cargo.toml
Last active November 3, 2023 12:18
Code for rust-oracle to ADB
[package]
name = "adb_rust"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
oracle = "0.5.7"
slug 2022/01/ext-tech-blog-1
title A deep-dive on a Progressive Web App implementation for a React-based App platform (DHIS2)
author German Viscuso
author_url https://github.com/germanviscuso
author_image_url https://github.com/germanviscuso.png
tags
dhis2
health
java
react
pwa

At DHIS2 we're a team of fully remote developers working on the world's largest open-source health information management system, used by 73+ countries for collecting and analyzing health data. You can check our repos here but basically, at the risk of oversimplifying things, we maintain a fully APIfied Java back-end core project and a series of core web apps built on top of a React based front-end technology that we call the App Platform supported by a design system with custom UI components (we have advanced Analytics and an Android SDK too but

@germanviscuso
germanviscuso / index.js
Created November 13, 2020 11:49
Alexa Node SDK Navigation Directive
return handlerInput.responseBuilder
.speak('Starting navigation')
.addDirective({
type: 'Navigation.SetDestination',
destination: {
singleLineDisplayAddress: "Calle de San Mateo 13, 28004",
multipleLineDisplayAddress: "Calle de San Mateo 13, 28004",
name: "Museo del Romanticismo",
coordinate: {
latitudeInDegrees: 40.425860,