This file contains hidden or 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
| -- Dado FIELD con tipo de dato BLOB y tamaño 1Mb que contiene un XML, para pasarlo a un CLOB y que se pueda ver en una consulta SQL, se puede hacer la siguiente consulta | |
| SELECT XMLSERIALIZE(XMLPARSE(DOCUMENT FIELD) AS CLOB(1M)) FROM MY_TABLE WHERE FIELD IS NOT NULL FETCH FIRST 100 ROWS ONLY; | |
| -- Si se quiere obtener del XML un campo concreto | |
| WITH MYXML AS (SELECT XMLSERIALIZE(XMLPARSE(DOCUMENT PV_VALXML) AS CLOB(1M)) PV_VALXML FROM PERITOS_VALORACIONES WHERE PV_VALXML IS NOT NULL FETCH FIRST 300 ROWS ONLY) | |
| SELECT IFNULL(TOTAL_HORAS, '') | |
| FROM MYXML X, XMLTABLE( |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # Bash script to convert JSON data using jq. | |
| ############################################################################### | |
| # MIT License | |
| # | |
| # Copyright (c) 2024 Jens Melgard Churchill <[email protected]> | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal |
This file contains hidden or 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
| // Añadir al pom | |
| <dependency> | |
| <groupId>org.springframework.boot</groupId> | |
| <artifactId>spring-boot-starter-logging</artifactId> | |
| </dependency> | |
| // Indicar estas propiedades en el fichero properties | |
| // El nivel de logging se verá en rojo en este caso | |
| spring.output.ansi.enabled=always | |
| logging.pattern.level=%clr(%5p){red} |
This file contains hidden or 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
| function parseJwt (token) { | |
| var base64Url = token.split('.')[1]; | |
| var base64 = base64Url.replace('-', '+').replace('_', '/'); | |
| return JSON.parse(window.atob(base64)); | |
| }; |
This file contains hidden or 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
| # Install dependencies only when needed | |
| FROM node:18-alpine3.15 AS deps | |
| # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | |
| RUN apk add --no-cache libc6-compat | |
| WORKDIR /app | |
| COPY package.json yarn.lock ./ | |
| RUN yarn install --frozen-lockfile | |
This file contains hidden or 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
| # Install dependencies only when needed | |
| FROM node:18-alpine3.15 AS deps | |
| # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | |
| RUN apk add --no-cache libc6-compat | |
| WORKDIR /app | |
| COPY package.json yarn.lock ./ | |
| RUN yarn install --frozen-lockfile | |
| # Build the app with cache dependencies | |
| FROM node:18-alpine3.15 AS builder |
This file contains hidden or 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
| // check version | |
| node -v || node --version | |
| // list installed versions of node (via nvm) | |
| nvm ls | |
| // install specific version of node | |
| nvm install 6.9.2 | |
| // set default version of node |