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
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 title author author_url author_image_url tags
2022/01/ext-tech-blog-1
A deep-dive on a Progressive Web App implementation for a React-based App platform (DHIS2)
German Viscuso
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,
@germanviscuso
germanviscuso / TwoASK-CLIs.md
Last active March 3, 2022 14:09
Use old and new ASK-CLIs in parallel (Alexa Skills Kit Command Line Interface)

I advise that if the VSCode plugin supports the ask-cli v2 then use Method 1. If we're not there yet then use Method 2 if you want the VSCode plugin to work. If you don't care about the plugin just go with Method 1.

Method 1

After following these instructions the old ask-cli v1.7.23 will run via the command ask1 and the latest ask-cli v2 via the command ask. You will be able to update the ask-cli v2 as usual. You can skip all steps below to create the npm package by just doing:

@germanviscuso
germanviscuso / example-query.js
Created April 4, 2020 23:30 — forked from thetrevorharmon/example-query.js
Query JSON with S3 Select in Node.js
// See tth.im/s3json for a full explanation of this code
const AWS = require('aws-sdk');
const S3 = new AWS.S3();
exports.handler = async (_, context) => {
try {
const query = 'SELECT * FROM s3object[*].results[*] r;';
// test query is against data from https://swapi.co/api/planets/?page=2
@germanviscuso
germanviscuso / index.js
Last active February 24, 2020 16:02
Quick code to support an intent that plays long form audio in an Alexa skill
var stream = {
"token": "my_token", // no auth token, you decide what this is
"url": 'https://my_song.mp3',
"metadata" : {
"title": "My Song Title",
"subtitle": "My Song Subtitle",
"art": {
"sources": [
{
"contentDescription": "image",
@germanviscuso
germanviscuso / gist:26f3f96d9048c5446acc6e4cfe8009d6
Created January 13, 2020 16:55
Overwrite existing git repo with another one
(Switch to old repo)
> git remote add new-origin new_repo_url
> git remote update
> git push -f new-origin master --follow-tags (WARNING: new repo gets overwritten!)
@germanviscuso
germanviscuso / index.js
Created November 26, 2019 11:39
hello world
// This sample demonstrates handling intents from an Alexa skill using the Alexa Skills Kit SDK (v2).
// Please visit https://alexa.design/cookbook for additional examples on implementing slots, dialog management,
// session persistence, api calls, and more.
const Alexa = require('ask-sdk-core');
const LaunchRequestHandler = {
canHandle(handlerInput) {
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'LaunchRequest';
},
handle(handlerInput) {