Ir al contenido principal

Entradas

How to get the path and name from git log

Hi people. The last day, I got a simple task, get all path and name from git log. In this case It's only necessary a console and project whit some commits .  The simplest command is there: git log --raw This command get the name of author, date, commit and file affected. Is simple but is not for me, because I need the path and name of the file affected. Not all these data The second command is here: git log --pretty=format: --name-only The command getting only the path and name; is just I needed. Not showing extra data, but it's separate by newline (later is necessary to delete for create a report for my boos) If you need show the author and date, only add some parameters, for example git log --pretty=format:"%an, %ar%n" --name-only Another way for get only paths and names is there, the problem with this command is getting all files. You think, my project contains 10k files affected, the time to get all data is slow. This command is not insert newline for separa
Entradas recientes

Limpieza preventiva RTX 3070 Aorus master

He subido un nuevo video en donde doy limpieza a mi vieja grafica

Install nvm on macbook m1 for work with node the best way

 On this week I buyed a new macbook pro m1 (thank you BTC for the partner), is a great laptop but is necesary to configure all environment for work with node and is necesary the next: Check the type of the bash Download the file to configure the nvm Check or create file to set environment vars in user folder Check is nvm configure to actual user Download the node Check the type of the bash The macbook pro m1 is configure to zsh bash (under macOS Monterrey) , but is probable to show another bash, for check this is necesary execute the next command line in a terminal echo $SHELL If the exist is /bin/zsh This tutorial is for you, is you not show the text, dont worry, in the official documentation is the step by step to configure all environment for your bash and is here Download the file to configure the nvm For download the file config, open a terminal and execute the next command curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash Check or create file to set

How to mirror Android device from USB

Are you thinking of using your Android device on your laptop or PC via USB to work? Are you thinking of copying and pasting the content easily to your device to perform more agile tests? Well, this is your post!!! Scrcpy This is a open source project, is amazing for mirror your android device via USB (work via WiFi but I not use this function). Actuality is in version 1.18 Requirement : Android device requires at least API 21 (Android 5.0) SO: Windows, Linux or MacOS Android mode developer activate In my test is working when I activate the "transfer file" but in other devices is work in mode USB "transfer photos" and "none". You have to test in which way your device work. The copy and paste is work to the phone for files and text. But only working from device to PC/Laptop with text plain. Is perfect to streaming the screen of your device, check the next video: 

How to upload File from form data POST in Android with Retrofit 2

 The last day I explain how to upload a simple CSV file using node . And now I teach how to upload from android device. Get source code here:  GitHub This article is write in java... later I'll add the method for kotlin. The logic is not changed, only the format code. 1) Is necessary add the dependencies in gradle: module implementation 'com.google.code.gson:gson:2.8.6' // RETROFIT // implementation 'com.squareup.retrofit2:retrofit:2.6.2' implementation 'com.squareup.retrofit2:converter-gson:2.6.2' implementation 'com.squareup.retrofit2:converter-scalars:2.5.0' 2) Add permissions in AndroidManifest.xml and modified the application for work with network security policy <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> in applitacion add

How to upload File with node and form data POST

 Hello, this is a simple project for testing my app in Android, but is very useful for work in other app. In this case is using for upload a CSV file, but is very simple change the type of file This code is available on GitHub Requirement: Node JS >= 12  Nodemon  First the node app is created: npm init (Change the main to app.js) Second, install dependencie: npm i ---save express npm i ---save multer npm i ---save cors The magic or helper is multer , with this library we can upload different files. Express is a simple web server and the cors is to avoid problems. Initialize all const for work const multer = require('multer'); const express = require('express'); const cors = require('cors'); const path = require('path'); const fs = require('fs'); const app = express(); const port = 3000; Now is necessary to create a folder for upload all CSV, in this case is called "uploads" let uploads = __dirname + '/uploads'; if (!fs.exists

Como encriptar AES con Node JS

  Puedes descargar el proyecto desde este enlace El otro día surgió una necesidad para encriptar contenido bajo el algoritmo AES y es la que te vengo a mostrar a continuación en la cual use Node para solventar mi necesidad. Pude haber usando cualquier lenguaje que me viniera en gana pero no quería instalar nada mas. Dependencias: NodeJS >= 12 Crypto-JS Aplicaciones recomendadas: Git bash Visual Studio Code Lo primero que necesitamos es tener una clave única (KEY) y un vector de inicialización (IV). Este ultimo no es necesario pero agrega un extra de seguridad a nuestro contenido. Para lo cual usaremos el bash de git para utilizar openssl KEY openssl rand -base64 24 IV openssl rand -base64 12 Ahora que ya tenemos estas 2 cadenas únicas. Podemos proceder a escribir nuestro código. npm init -y Luego hacemos una modificación en el package.json para que admita módulos "type": "module", Instalamos la dependencia de Crypto-JS npm i crypto-js --save Ahora importamos l