Skip to content

Instantly share code, notes, and snippets.

View vituchon's full-sized avatar

Vituchon vituchon

  • omnia salud
  • buenos aires
View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 12 columns, instead of 1 in line 9.
Dextrosa 5%,Fármacos,Fluidos,10,Cajas,NutriCare,Caja de 10 tabletas,10,L86410,04/10/2025,Centro Ambulatorio,65
Ranitidina,Fármacos,Medicamentos,10,Ampollas,HealthPro,Ampolla 5ml,6,L79298,04/12/2025,Centro Ambulatorio,30
Furosemida,Fármacos,Medicamentos,10,Ampollas,BioSafe,Ampolla 5ml,10,L19990,03/09/2025,Centro Ambulatorio,13
Paracetamol,Fármacos,Medicamentos,10,Cajas,HealthPro,Caja de 100 unidades,7,L62685,08/01/2028,Centro Ambulatorio,56
Sueroterapia Hartmann,Fármacos,Fluidos,10,Cajas,NutriCare,Caja de 100 unidades,2,L13074,07/07/2027,Centro Ambulatorio,42
Ringer Lactato,Fármacos,Fluidos,10,Ampollas,Sanitas,Ampolla 5ml,8,L12026,16/10/2025,Centro Ambulatorio,39
Ibuprofeno,Fármacos,Medicamentos,10,Paquetes,NutriCare,Paquete de 50 unidades,3,L48891,14/07/2027,Centro Ambulatorio,20
Diclofenaco,Fármacos,Medicamentos,10,Cajas,Vitalis,Caja de 10 tabletas,4,L80263,29/07/2026,Centro Ambulatorio,57
Salbutamol,Fármacos,Medicamentos,10,Cajas,PharmaLife,Caja de 10 tabletas,10,L48333,26/12/2025,Centro Ambulatorio,56
Amox
Vendas,Insumos,Descartables,10,Caja,Plusclean,Papel,1,A-25,31/12/2024,Centro Dev,50
Tijeras,Insumos,Descartables,10,Caja,Cuty,Caja,1,A-25,31/12/2026,Centro Dev,100
@vituchon
vituchon / gist:54be5fcc836e1ff3dbd0bb1349a8b5af
Last active May 17, 2024 00:15
Análisis de temperatura dia a dia correspondiente al mes abril (04) del año 2024, usando datos de alerta del INA
FUENTE DE DATOS: https://alerta.ina.gob.ar/a5/secciones?generalCategory=&varId=&redId=&estacionId=&seriesId=32843&procId=&timestart=2024-04-01&timeend=2024-04-30&submit=&data_availability=h&west=&north=&east=&south=&cal_grupo_id=&cal_id=&forecast_date=&fuentesId=
Y me bajé un JSON... lo pase a CSV usando herramientas online https://data.page/json/csv
Luego
CREATE DATABASE "INA"
WITH
OWNER = postgres
ENCODING = 'UTF8'
@vituchon
vituchon / gist:71c9106adb8edc6702287f079c85605e
Created May 16, 2024 18:18
golang Http server - can not HOLD a panic inside a gorutine
haceme el favor... corre este código y averigualo por vos mismopackage main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/panic", func(w http.ResponseWriter, r *http.Request) {
panic("¡Esto es un panic!")
@vituchon
vituchon / gist:0b3d75286be5ce075c01f894f0bbc8bf
Created May 16, 2024 17:36
Golang mux webserver - Testing graceful shutdown behavior
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
#!/bin/sh
# diff is called by git with 7 parameters:
# path old-file old-hex old-mode new-file new-hex new-mode
kdiff3 "$2" "$5" | cat
function sumTableCells(tableId,cellIndex) {
var table = document.getElementById(tableId);
debugger;
let subTotal = Array.from(table.rows).reduce((total, row) => {
const textContent = row?.cells[cellIndex]?.textContent
return total + textContent ? parseInt(textContent.split(" ")[1].replace(",",".")) : 0
}, 0);
return subTotal
}
sumTableCells("table",5)
This file has been truncated, but you can view the full file.
Nabs Carlos
Alejandro Bologna
ANALIA ANTONIA ABALOS
María Pia Editadaaa Paz
Gonzalo Mauricio Coria
Usuario Sistema
Matias Buscaglia
Alexis Eme
Christian Sánchez
Cecilio Luis Cerisoli
@vituchon
vituchon / deferBuilder.ts
Last active April 21, 2023 13:21
Construyendo deferreds a manopla
function deferBuilder<T>() {
type resolveType = (value: T) => void;
interface resolveInterface { // no funca con interface :S
(value: T): void;
}
type rejectType = (reason?: any) => void
var resolve: resolveType;
var reject: rejectType
const promise = new Promise(function (_resolve: resolveType, _reject: rejectType) {
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
</style>
<script>