-
Check for updates
sudo yum update -y
-
Install dependencies
sudo yum install -y zsh util-linux-user
-
Change to zsh to default
sudo chsh -s /usr/bin/zsh $USER
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: simple-rest-golang-deployment | |
namespace: retail-project-dev | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: |
// Llamar Biblioteca nativa para servidor HTTP | |
const http = require('http'); | |
// Crear el servidor HTTP | |
const server = http.createServer((req, res) => { | |
// Observa como vienen las rutas | |
// console.log(req.url); | |
if (req.url === '/') { | |
res.write('Ahora te encuentras en el Home "/"'); | |
return res.end(); |
// Llamar Biblioteca nativa para levantar un servidor HTTP | |
const http = require('http'); | |
// Crear servidor | |
const server = http.createServer((req, res) => { | |
res.write('Hello World'); | |
res.end(); | |
}); | |
// Especificar en que puerto debe escuchar el servidor las peticiones |
/* | |
Para completar exitosamente este punto se debe inicializar npm dentro del proyecto | |
con el comando 'npm init'. Este genera una serie de preguntas como el nombre del proyecto, | |
la version, entre otras preguntas. | |
+ npm init | |
+ npm install --save is-number | |
Esperar a que se cree el archivo package.json, luego instalar la dependencia, esperar | |
a que este creado el archivo package-lock.json y la carpeta node_modules. |
/* | |
En este ejemplo se realiza el uso de un modulo nativo junto con | |
el modulo que acabamos de hacer | |
*/ | |
// Importamos una Biblioteca Nativa | |
const fs = require('fs'); | |
const nuestroModulo = require('./2_propio'); | |
// Nota: Si no especifican el 'encoding' readFile retorna un Buffer en la variable 'data' | |
// Nota 2: Probar sin 'uft8' como parametro |
// checkIfString verifica si el parametro corresponde a un String | |
const checkIfString = (str) => { | |
if (typeof str === 'string' || str instanceof String) { | |
return true; | |
} | |
return false; | |
} | |
// checkIfNumber verifica si el parametro ingresado corresponde a un Numero | |
const checkIfNumber = (num) => parseInt(num) === num; |
/* | |
URL DOC: https://nodejs.org/api/fs.html | |
URL Ejemplo: https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback | |
*/ | |
// Realizamos el llamado de la Biblioteca FileSystem (fs) | |
const fs = require('fs'); | |
// Agregamos el mensaje 'Hello World' en un buffer y guardamos la salida en la variable 'data' | |
const data = new Uint8Array(Buffer.from('Hello World!')); |
Sub ImportarData() | |
Dim pathToExcel As String | |
Dim sheetExcelOrigin As String | |
Dim numRows As Long | |
pathToExcel = "C:\Users\fransafu\Desktop\filename.xlsx" | |
sheetExcelOrigin = "Sheet1" | |
sheetExcelDest = "Destino" | |
strSplit = "/" |
Sub getFilename() | |
' Obtener Ultima fila y ultima columna | |
Dim numRows As Long | |
Dim numCols As Long | |
' Guardar texto de la ruta | |
Dim strDoc As Variant | |
' Guardar arreglo separado por la variable strSplit |