Skip to content

Instantly share code, notes, and snippets.

View realFranco's full-sized avatar
🚀
On a Rocket

Franco Gil realFranco

🚀
On a Rocket
View GitHub Profile
@realFranco
realFranco / translateScheduleBlocks.js
Created August 25, 2021 20:51
Map structures between Backend & Frontend services.
INPUT_DATA_BACK = [
{
"weekDayName": 3,
"scheduleBlocks": [
{
"startWorkingTime": 480,
"endWorkingTime": 720,
"tag": null,
"description": null
},
@realFranco
realFranco / python_pipeline.py
Created August 3, 2021 19:15
Script to compose a csv file.
"""
Description: Compose a CSV object.
Example execution:
python3 python_pipeline.py > output.csv
"""
import csv
@realFranco
realFranco / stage-fonasa-services-2020-v1.2.json
Last active May 20, 2021 20:11
Fonasa Codes result after apply a parser action (some descriptions contains wrong caracters, check the read prcess).
{
"fonasa": [
{
"group": "29",
"items": [
{
"subgroup": "2904",
"description": "POR ESPECIALISTA EN ONCOLOGIA Y HEMATOONCOLOGOS.",
"items": [
{
{
"fonasa": [
{
"group": "01",
"items": [
{
"subgroup": "0101",
"description": "ATENCION ABIERTA",
"items": [
{
@realFranco
realFranco / fibonacci.sql
Last active May 13, 2021 21:35
Using Procedural Language PostgreSQL for a Fibonacci number implementation.
-- Trying a fibonacci on pl/pgsql
create or replace function fibonacci( step integer )
returns integer as
$$
begin
-- raise info 'step %', step;
if step = 0 then
return 0;
else
{
"medical_agreement" : {
"client" : "ECR Salud",
"care_provider" : [
"ECR Salud",
"Inmunomedica",
"Centro Médico de Quilicura",
"UCM",
"Medismart",
"Teledoc",
{
"service_type" : [
{ "code" : "0108000", "description" : "Teleconsulta"},
{ "code" : "0101c01", "description" : "Visita Médica Presencial" },
{ "code" : "0101c02", "description" : "Atención Presencial" },
{ "code" : "0307c01", "description" : "Toma de Muestra Lab" },
{ "code" : "0108c01", "description" : "Atención de Teleconsulta" },
{ "code" : "0307c02", "description" : "Toma de Muestra PCR" },
{ "code" : "2601000", "description" : "Procedemiento de Enfermería" },
{ "code" : "2601c01", "description" : "Vacunación" }
# References
# https://majornetwork.net/2020/10/webhook-listener-with-fastapi/
# https://majornetwork.net/2020/11/systemd-setup-for-fastapi-webhook-listener/
git clone https://gitlab.com/realFranco/some-rest-service.git
cd into_the_folder
nano .env
sudo apt-get install python3-venv
python3 -m venv env
source env/bin/activate
@realFranco
realFranco / ses_sns_lambda_dynamodb.js
Last active February 22, 2021 20:00
Code for a Lambda function. Send data into Dynamodb.
/**
* Date: June 16th, 2020
* Dev: franco@systemagency.com
*
* > Code triggered by the lambda function to continue with SES Stats.
* > Including the original email headers on delivery notifications.
*
* Code taken from:
* > https://aws.amazon.com/premiumsupport/knowledge-center/lambda-sns-ses-dynamodb/
*
@realFranco
realFranco / deploy_ssl_nginx_react_yarn.sh
Last active December 29, 2020 20:29
Recipe to deploy an React app using the environment: ubuntu, nginx, node, npm2
# Steps to install the react Project
# Requirements:
# - ubuntu 18.04 ( I do not test it on 20.04 ).
# - git
# - Nginx
# - Node
# - pm2
# - Certbot