jueves, 11 de abril de 2024

manual inversor ups powerhouse begprod

 https://es.scribd.com/document/722237668/Begprod-Manual-Ups-Inverter-Powerhouse

lunes, 25 de septiembre de 2023

Configuración Teclado Keychron en Linux

Cuando conectas el teclado Keychron en Linux, este es tomado con la configuración de un teclado de MacOS.

Para configurarlo correctamente debes realizar los siguientes comandos en tu terminal:

echo 'options hid_apple fnmode=2' | sudo tee -a /etc/modprobe.d/hid_apple.conf

sudo update-initramfs -u -k all

sudo reboot

[Referencia]

Tabla de fnmode:

0 = disabled : Disable the 'fn' key. Pressing 'fn'+'F8' will behave like you only press 'F8'.

1 = fkeyslast : Function keys are used as last key. Pressing 'F8' key will act as a special key. Pressing 'fn'+'F8' will behave like a F8.

2 = fkeysfirst : Function keys are used as first key. Pressing 'F8' key will behave like a F8. Pressing 'fn'+'F8' will act as special key (play/pause).

martes, 20 de septiembre de 2022

Preparing a Linux machine for Golang Profiling Test

Debes setear el CPU para que sufra el mínimo recalientamiento durante las pruebas, esto con el objetivo de evitar falsos resultados en las pruebas causadas por aumentos o disminuciones de las frecuencias del CPU 

Paso 1: Instala una distro sin modo gráfico (ubuntu server por ejemplo)


Paso 2: Configurala para que el CPU se recaliente al mínimo

Vamos a crear un servicio, que cuando levante, deshabilite el turbo boost, el hyperthreading y setee la frecuencia del CPU al mínimo.

1- Primero debes crear el fichero

nano /usr/bin/enable-profiling-mode.sh

 Debes escribir lo siguiente:

# Apaga el turbo

/bin/sh -c "/usr/bin/echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo"

# Apaga el turbo (por si el de arriba no funciona)
wrmsr --all 0x1a0 0x4000850089

# Apaga el hyperthreading

echo off > /sys/devices/system/cpu/smt/control

# Setea la frecuencia al mínimo (en mi caso 800MHz)
sudo cpupower frequency-set -g performance

sudo cpupower frequency-set -u 800MHz



y para desactivar este modo:

nano /usr/bin/disable-profiling-mode.sh

 Debes escribir lo siguiente:

/bin/sh -c "/usr/bin/echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo"

sudo wrmsr --all 0x1a0 0x850089

echo on > /sys/devices/system/cpu/smt/control

sudo cpupower frequency-set -g powersave



Luego debes crear el siguiente servicio:

nano /etc/systemd/system/cpu-profile-mode-on.service

Y escribir esto dentro:

[Unit]

Description=Prepare the machine for profiling 

[Service]

ExecStart=/bin/sh /usr/bin/enable-profiling-mode.sh

ExecStop=/bin/sh /usr/bin/disable-profiling-mode.sh

RemainAfterExit=yes

[Install]

WantedBy=sysinit.target



Luego debes habilitar el servicio

systemctl enable /etc/systemd/system/cpu-profile-mode-on.service

y luego levantarlo

systemctl start /etc/systemd/system/cpu-profile-mode-on.service

Si ves el status:


Luego si ejecutas i7z deberías ver esto



Luego vamos a estresar la máquina con el siguiente comando:

stress --cpu 8 --io 4 --vm 2 --vm-bytes 5GB --timeout 20s


Observaremos que la frecuencia del CPU se mantiene y su tempreratura aumenta solo un poco






jueves, 27 de enero de 2022

Generate gRPC client for dart (flutter) with protoc-gen-dart on macOS

 First: install flutter

Second: install the protoc-gen-dart plugin

dart pub global activate protoc_plugin


Third: Add symlink to dart cache dir in bin

dart pub global activate protoc_plugin


The protoc-gen-dart must be in the following path:

$HOME/.pub-cache/bin/protoc-gen-dart

You need to add the compiler to path

export PATH="${PATH}:${HOME}/.pub-cache/bin"

miércoles, 22 de septiembre de 2021

SonarQube mac installation

1- Run:

brew install sonar

brew install sonar-scanner


Add to bash_profile

nano  ~/.bash_profile

And paste:

export SONAR_VERSION=4.6.2.2472_1

export SONAR_HOME="/usr/local/Cellar/sonar-scanner/${SONAR_VERSION}/libexec"

export SONAR="${SONAR_HOME}/bin"

export PATH="${SONAR}:${PATH}"



launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.sonarqube.plist


http://localhost:9000

miércoles, 14 de julio de 2021

Download any apk from play store

He probado trés páginas y esta es la mejor

 https://androidappsapk.co/

https://m.apkpure.com/es/apkpure/com.apkpure.aegon

https://apps.evozi.com/apk-downloader

martes, 27 de abril de 2021

sábado, 16 de enero de 2021

Setup mac

 Setup mac:


iTerm:


Start - end:

Go to Profile -> Keys -> Key bindings 

"Send hex code" -> 0x01 to "Start of text" (inicio or home)

"Send hex code" -> 0x05 to "End of text" (fin or end)


flutter doctor --android-licenses

jueves, 12 de noviembre de 2020

domingo, 13 de septiembre de 2020

Fix err_cleartext_not_permitted ionic 3

Add this namespace definition to <widget

 xmlns:android="http://schemas.android.com/apk/res/android"


Then add this config in widget:

    <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">

        <application android:usesCleartextTraffic="true" />

    </edit-config>

jueves, 10 de septiembre de 2020

martes, 10 de marzo de 2020

Oracle DB with Jetbrains DataGrip and DBeaver

First run the oracle db in docker:

docker run --name ora121 -p 1521:1521 -p 5500:5500 -e ORACLE_SID=ORCLCDB -e ORACLE_PDB=pdb1 -e ORACLE_PWD=Oradoc_db1 -e ORACLE_CHARACTERSET=AL32UTF8 store/oracle/database-enterprise:12.2.0.1

Jetbrains DataGrip

DBeaver


domingo, 7 de julio de 2019

java.library.path in ubuntu

/usr/java/packages/lib/amd64
/usr/lib/x86_64-linux-gnu/jni
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/jni
/lib:/usr/lib

sábado, 6 de julio de 2019

uninstall gnome games

sudo apt remove gnome-chess five-or-more four-in-a-row hitori iagno gnome-klotski lightsoff gnome-mahjongg gnome-mines gnome-nibbles gnome-tetravex gnome-taquin tali swell-foop gnome-robots quadrapassel aisleriot

sábado, 13 de abril de 2019

Install ubuntu 18.10 in Asus VivoBook Pro

Ah, so I solved it this way:



1. Disable Fast Boot and Secure Boot (or Secure loader).



2. Plug in the bootable USB with the Linux distro (mine was Ubuntu 16.04)



3. When you see the loader to "Install Ubuntu" etc ... press "e" and edit a line:

Replace "quiet splash" to "nomodeset" and press F10 to boot.



Then after the installation is complete, you will have to reboot. 



4. This time you will now encounter the GRUB. Again, press "e" and edit a line:

In the line that starts with "linux", add "nouveau.modeset=0" at the end of that line.



Your Linux should now boot. 



P.S. Mark the thread as solved if this solves the issue 

5. After this, you need to install the nvidia drivers. Reboot. And then it's done.