lunes, 30 de mayo de 2022

Proceso de Compilación en JAVA

Proceso de Compilación en JAVA
===============================
Un programa Java pasa por dos pasos principales desde la creación del archivo fuente hasta la ejecución del programa:

El compilador compila el archivo fuente en bytecode (ByteCode);

El código de bytes es interpretado y ejecutado por la máquina virtual Java. Debido a que el programa Java tiene que ser compilado e interpretado por la JVM al mismo tiempo.

domingo, 29 de mayo de 2022

Desactivar Windows Defender en Windows 11 desde Powershell

Desactivar Windows Defender en Windows 11 desde Powershell
=================================================
Ejecutar como Administrador Powershell
$> Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
$> netsh advfirewall set currentprofile state off


Para activar de nuevo Windows Defender usaremos
$> Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
$> netsh advfirewall set currentprofile state on

miércoles, 25 de mayo de 2022

Como eliminar un repositorio PPA en Debian

Como eliminar un repositorio PPA en Debian
-----------------------------------------------------------
$> cd /etc/apt/sources.list.d/
$> ls

Localizamos el ppa y procedemos a eliminarlo:
$> sudo rm nombre_del_ppa
$> ls

Instalar Fuentes en Debian

Instalar Fuentes en Debian
=====================
Descomprimir la Fuente y solo copiar la carpeta TTF en el directorio "truetype"
$> su -
$> cp -r /home/username/Descargas/TTF /usr/share/fonts/truetype

Recargar la lista de fuentes ejecutando el siguiente comando en la terminal:
$> sudo fc-cache -f -v

Agregar Fuentes
$> cp -r /home/username/Descargas/TTF/* /usr/share/fonts/truetype/TTF

Instalar Edge Chromium en Debian 11

Instalar Edge Chromium en Debian
====================================================
Instalar paquetes requeridos
$> sudo apt install apt-transport-https ca-certificates curl software-properties-common wget -y

Descargar la Clave GPG de Microsoft Edge
$> sudo wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/microsoft-edge.gpg

Importar el repositorio de Microsoft Edge
$> echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' | sudo tee /etc/apt/sources.list.d/microsoft-edge.list

$> sudo apt update

Instalar el navegador Microsoft Edge
$> sudo apt install microsoft-edge-stable

Actualizar el navegador Microsoft Edge
$> sudo apt update
$> sudo apt upgrade

Eliminar el navegador Microsoft Edge
$> sudo apt autoremove microsoft-edge-stable --purge

Instalar LibreOffice en Debian 11

Instalar LibreOffice en Debian 11
====================================================

Instalar las fuentes de Microsoft TrueType

$> sudo apt-get install ttf-mscorefonts-installer

$> sudo apt install libreoffice

$> sudo apt update
$> sudo apt upgrade

Instalar Otras Fuentes 
=====================
Descomprimir La fuente y solo copiar la carpeta TTF en el directorio "truetype"
$> su -
$> cp -r /home/username/Descargas/TTF /usr/share/fonts/truetype

Recargar la lista de fuentes ejecutando el siguiente comando en la terminal:
$> sudo fc-cache -f -v

Agregar nuevas Fuentes
$> cp -r /home/username/Descargas/TTF/* /usr/share/fonts/truetype/TTF

Desintalar totalmente un paquete DEBIAN

Desinstalar totalmente un paquete en Debian:

$> sudo apt remove --purge konqueror*
$> sudo apt autoremove

Personalizar DEBIAN 11 KDE


Personalizar DEBIAN 11 KDE
===============================
Buscamos
1:Tema Global : Brisa Oscuro
2:Estilo Plasma: Brisa Claro
3:Comportamiento General: Doble clic para abrir archivos y carpetas
4:Pantalla de bienvenida:ninguna
5:Bloqueo de pantalla:desactivar
6:Preferencias del sistema -> Pantalla de inicio de Sesion
   Buscamos e Instalamos el nuevo tema:
   Breeze 5.14 Extended for KDE Plasma
   Eliminamos los demas temas y aplicamos el nuevo tema
7:Bordes de pantalla -> Seleccionar solo esquina superior izquierda
    Presentar ventanas - Escritorio virtual 
    Retardo activacion:50ms
8:Arranque y apagado -> Sesión de escritorio 
                                        -> Iniciar Sesión -> Comenzar con una sesión vacía
9:Decoraciones de la ventana -> Editar Brisa
           Desactivar: Dibujar un circulo alrededor el boton de cierre
                               Dibujar un gradiente del fondo de la barra de titulo
           Activar:  Añadir un asa para cambiar el tamaño ventana
10:Gestión de ventanas -> Comportamiento de las ventanas
                                              Avanzado-> Ubicación de ventanas: Centrada
11:Efectos del escritorio -> Desactivar Transparencia
12:Colores : Editar Brisa Oscuro
                      Barra de Titulo Activa:#31363b                               
13:Aplicaciones->Aplicaciones predeterminadas
   Navegador Web: Microsoft Edge
14:KRunner -> Desactivar la búsqueda anterior
15:Cambiamos los atajos de la terminal Konsole
   Preferencias -> Configurar los accesos rapidos
                            Copiar:Ctrl+C
                            Pegar: Ctrl+V
   Para ocultar el menu de Konsole -> Ctrl+Shift+M
   Para abrir nueva pestaña -> Ctrl+Shift+T
   Configurar Barra de pestañas/separadores:
        ->Aspecto   
Mostrar:siempre
                            Posicion:Encima del area del terminal       
   Config General: desactivar mostrar la barra de menú
   Editar perfil -> 80 columnas 20 filas
   Cambiar tamaño de letra 12pt


Instalar Flameshot -> Capturar y editar imagen

$> sudo apt install flameshot


Instalar VLC -> Reproductor de video

$> sudo apt install vlc


Eliminar paquetes instalados

$> sudo apt remove --purge kdeconnect*

$> sudo apt remove --purge konqueror*

$> sudo apt remove --purge juk*

$> sudo apt remove --purge k3b*

$> sudo apt remove --purge dragonplayer*

$> sudo apt remove --purge imagemagick*

$> sudo apt remove --purge xterm*

$> sudo apt autoremove

 

lunes, 23 de mayo de 2022

DEBIAN 11 KDE


Link Debian 11 KDE:
https://cdimage.debian.org/debian-cd/current-live/amd64/bt-hybrid/

Despues de La instalacion:

====================
$> su- 

$> usermod -aG sudo username
$> vim /etc/apt/sources.list

Reemplazar todo por estas lineas :
----------------------------------------------------------------------------------------
deb http://deb.debian.org/debian/ bullseye main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye main contrib non-free

deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free

deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free

# bullseye backports
deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free

---------------------------------------------------------------------------------------------------

$> apt update
$> apt upgrade

Reiniciamos pc

Instalar Drivers y soporte Bluethooth en Debian 11

$> sudo apt install bluetooth bluez bluez-cups bluez-tools btscanner gnome-bluetooth python3-bluez pulseaudio-module-bluetooth

Instalar Driver de Wifi:

Verificamos modelo del driver Wifi
$> lspci

Instalamos synaptic desde discover o por terminal para descargar el driver
$> sudo apt install synaptic

Abrimos el gestor de paquetes Synaptic y Buscamos el modelo del driver del Wifi y lo instalamos

Reiniciamos la pc y validamos el Wifi

Configurar resolucion maxima de pantalla en Linux Ubuntu/Debian

Configurar resolucion maxima de pantalla en Linux Ubuntu/Debian
===============================================================

Identificar la resolucion maxima del monitor

$> xrandr

$> cvt 2560 1440
Modeline "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync

$> xrandr --newmode "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
$> xrandr --addmode HDMI-3 "2560x1440_60.00"

$> xrandr -s 2560x1440

$> vim /home/name_user/.profile
Al final del archivo agregar los comandos de xrandr:
-----------------------------------------------------------
xrandr --newmode "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
xrandr --addmode HDMI-3 "2560x1440_60.00"
-----------------------------------------------------------

Nota: Si no se aplicar los cambios utilizar este comando:
$> xrandr --output HDMI-3 --mode "2560x1440_60.00"

Otro Software para configurar:
$> sudo apt install arandr


domingo, 22 de mayo de 2022

miércoles, 4 de mayo de 2022

Configuracion Inicial Laravel 9

Configuracion Inicial Laravel 9
==========================
Cambiar de ubicacion el directorio de Apache: D:\laragon\www
$> cd /c/laragon/bin/apache/httpd-2.4.47-win64-VS16/conf
$> vim httpd.conf
:252 DocumentRoot "D:/laragon/www"
:253 <Directory "D:/laragon/www">

Crear Proyecto Laravel:
$> cd /d/laragon/www/
$> composer create-project laravel/laravel blog

Ingresar al navegador
http://blog.test

Agregar Mysql version 8 en Laragon


Agregar Mysql Version 8 en Laragon
=====================================
Detener Laragon
Descargar Mysql 8 => https://dev.mysql.com/downloads/installer/
Crear una carpeta en C:\laragon\bin\mysql
       Nombre de la carpeta: mysql-8.X.X-winx64
Instalar Mysql 8 en la siguiente ruta => C:\laragon\bin\mysql\mysql-8.X.X-winx64
Agregar Variable de entorno
   Variables del Sistema -> Path -> Nuevo
   C:\laragon\bin\mysql\mysql-8.X.X-winx64\bin
Cambiar a nueva versión de Apache
Descargar Apache -> https://www.apachelounge.com/download/
   Descomprimir en la siguiente ruta C:\laragon\bin\apache

Iniciamos el servicio de mysql
Ejecutar: services.msc
MySQL80 -> Iniciar

Ejecutar cmd:
$> mysql --version
Cambiar Contraseña de Root
$> mysql -u root -p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'test123';
mysql> exit;

Verificar versión de MYSQL
Desde el cliente Mysql Workbench
Ejecutar la consulta:
> select version();

Agregar phpMyAdmin a Laragon
==============================
Detener Laragon
Descargar PhpmyAdmin =>https://www.phpmyadmin.net/downloads/
Descomprimir en la siguiente ruta:
C:\laragon\etc\apps

Renombrar carpeta phpMyAdmin

Verificar phpMyAdmin
Iniciar laragon y validar el acceso
http://localhost/phpmyadmin


-----------------------------------------------------------------------------
Nota: Solo si muestra mensaje blowfish
$> cd /C/laragon/etc/apps/phpMyAdmin
$> vim config.inc.php          (Poner una clave cualquiera)
16:$cfg['blowfish_secret'] = 'aS#Ttb6S*[hExCn{hT+zrD~n-o{TYL7lOvIJjg*a@ga#gs%dgysd';

Reiniciar Apache y validar el ingreso nuevamente
http://localhost/phpmyadmin
-----------------------------------------------------------------------------

martes, 3 de mayo de 2022

Install oh-my-zsh

 Install oh-my-zsh

=========================

$> sudo apt install zsh

$> sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

$> vi ~/.zshrc

------------------

ZSH_THEME="robbyrussell"

cambiar ZSH_THEME="agnoster"

---------------------


Editar Theme

vi ~/.oh-my-zsh/themes/agnoster.zsh-theme


Configuracion Visual Studio Code

 {

  "editor.fontSize": 16,

  "window.zoomLevel": 0,

  "editor.fontFamily": "Hasklig, Mononoki Nerd Font, Consolas, 'Courier New', monospace",

  "editor.letterSpacing": 0.3,

  "editor.parameterHints.enabled": false,

  "editor.insertSpaces": true,

  "editor.tabSize": 2,

  "editor.detectIndentation": false,

  "editor.defaultFormatter": "esbenp.prettier-vscode",

  "editor.folding": true,

  "editor.formatOnSave": true,

  "editor.formatOnPaste": true,

  "editor.formatOnType": true,

  "editor.suggestSelection": "recentlyUsedByPrefix",

  "editor.suggest.preview": true,

  "editor.minimap.enabled": false,

  "editor.wordWrap": "on",

  "editor.smoothScrolling": true,

  "editor.bracketPairColorization.enabled": true,

  "editor.guides.bracketPairs": true,

  "editor.linkedEditing": true,

  "editor.cursorBlinking": "smooth",

  "editor.renderWhitespace": "selection",

  "extensions.ignoreRecommendations": true,

  "workbench.list.smoothScrolling": true,

  "files.trimFinalNewlines": true,

  "files.insertFinalNewline": false,

  "files.trimTrailingWhitespace": true,

  "workbench.startupEditor": "none",

  "workbench.settings.editor": "json",

  "workbench.editor.wrapTabs": true,

  "window.titleBarStyle": "custom",

  "workbench.iconTheme": "material-icon-theme",

  "workbench.sideBar.location": "right",

  "workbench.activityBar.visible": false,

  "window.restoreWindows": "none",

  "git.ignoreMissingGitWarning": true,

  "terminal.integrated.profiles.windows": {

    "Git Bash": { "path": "C:\\Program Files\\Git\\bin\\bash.exe" }

  },

  "terminal.integrated.fontFamily": "MesloLGM NF",

  "terminal.integrated.defaultProfile.windows": "Git Bash",

  "terminal.integrated.fontSize": 16,

  // "files.autoSave": "onFocusChange",

  "explorer.autoReveal": false,

  "explorer.sortOrder": "type",

  "explorer.openEditors.visible": 0,

  "editor.occurrencesHighlight": false,

  //"editor.glyphMargin": false,

  //"editor.renderWhitespace": "all",

  "workbench.editor.enablePreview": false,

  "comment-divider.mainHeaderFiller": "=",

  "prettier.tabWidth": 2,

  "prettier.useTabs": false,

  "prettier.htmlWhitespaceSensitivity": "ignore",

  // "prettier.printWidth": 120,

  "prettier.bracketSpacing": true,

  // "prettier.semi": true,

  //"editor.rulers": [120],

  "php.suggest.basic": false,

  "php.validate.executablePath": "C:\\laragon\\bin\\php\\php-8.1.1-Win32-vs16-x64\\php.exe",

  "php.executablePath": "C:\\laragon\\bin\\php\\php-8.1.1-Win32-vs16-x64\\php.exe",

  "intelephense.format.braces": "k&r",

  "workbench.tree.indent": 17,

  "html.autoClosingTags": true,

  "css.validate": true,

  "scss.validate": true,

  "less.validate": true,

  "javascript.validate.enable": false,

  "eslint.enable": true,

  "eslint.validate": ["javascript"],

  "eslint.alwaysShowStatus": true,

  "material-icon-theme.folders.color": "#FFCA39",

  "workbench.colorTheme": "Material Dark Theme",

  "window.menuBarVisibility": "toggle",


  "workbench.colorCustomizations": {

    "titleBar.activeBackground": "#1D1D1C",

    "editor.background": "#1D1D1D",

    "activityBar.background": "#0F0F1A",

    "activityBar.border": "#3F3F46",

    "sideBar.background": "#1F1F1F",

    "sideBar.border": "#434343",

    "sideBar.foreground": "#DFDFDF",

    "sideBarSectionHeader.background": "#37373D",

    "activityBar.foreground": "#a9ebff",

    "activityBar.inactiveForeground": "#6B7A83",

    // "activityBar.activeBackground": "#ccda14",

    "activityBarBadge.background": "#00e6cb",

    "activityBarBadge.foreground": "#000000",

    "list.activeSelectionBackground": "#28537D",

    "list.inactiveSelectionBackground": "#28537D",

    "editorIndentGuide.activeBackground": "#8BD0FE",

    "editorIndentGuide.background": "#1E292F",

    "editorSuggestWidget.selectedBackground": "#005F9D",

    "editorSuggestWidget.highlightForeground": "#00F4D6",

    "editorSuggestWidget.foreground": "#e7e5e5",

    "editorSuggestWidget.border": "#4A4A4A",

    "list.inactiveSelectionForeground": "#fff",

    "tab.activeBorder": "#52DCFF",

    "tab.inactiveBackground": "#1D1D1C",

    "tab.activeBackground": "#1F4061",

    "tab.inactiveForeground": "#888888",

    "editorGroupHeader.tabsBackground": "#20201E",

    "editorCursor.foreground": "#FFCC00",

    // "editor.wordHighlightBackground": "#39f00b",

    "editor.wordHighlightBackground": "#1e1e1e00",

    "panel.border": "#007ACC",

    "statusBar.background": "#4A1757",

    "editor.lineHighlightBackground": "#1D1D1D",

    "editor.lineHighlightBorder": "#4F5960",

    "editorLineNumber.activeForeground": "#FFF",

    "editorLineNumber.foreground": "#596268",

    "editor.selectionBackground": "#264F78",

    "editorBracketMatch.background": "#464646",

    "editorBracketMatch.border": "#1E1E1E",

    "scrollbarSlider.hoverBackground": "#343C40",

    "scrollbarSlider.background": "#343C40",

    "scrollbarSlider.activeBackground": "#343C40",

    "editor.findMatchHighlightBackground": "#660",

    "editor.findMatchBackground": "#8f1527",

    "list.hoverBackground": "#343C40",

    "list.focusBackground": "#1B67A5",

    "pickerGroup.foreground": "#00F4D6",

    "editorWidget.resizeBorder": "#6ffd62",

    "editorWidget.background": "#0c142c",

    "selection.background": "#244B73",

    "widget.shadow": "#2e393f"

  },

  "[html]": {

    "editor.defaultFormatter": "esbenp.prettier-vscode"

  },

  "[php]": {

    "editor.defaultFormatter": "bmewburn.vscode-intelephense-client",

    "editor.formatOnSave": true,

    "editor.formatOnPaste": true

  },

  "[javascript]": {

    "editor.defaultFormatter": "esbenp.prettier-vscode",

    "editor.formatOnSave": true,

    "editor.formatOnPaste": true,

    "editor.tabSize": 2,

    "editor.codeActionsOnSave": {

      "source.fixAll.eslint": true,

      "source.fixAll.stylelint": true

    }

  },

  "[json]": {

    "editor.defaultFormatter": "esbenp.prettier-vscode",

    "editor.formatOnSave": true,

    "editor.formatOnPaste": true,

    "editor.tabSize": 2

  },

  "emmet.includeLanguages": {

    "javascript": "html",

    "php": "html"

  },


  "editor.tokenColorCustomizations": {

    "[Material Dark Theme]": {

      "comments": "#8B9398",

      "functions": "#9BBCFF",

      // "strings": "#FF0000",

      "textMateRules": [

        {

          "scope": ["entity.other.attribute-name"],

          "settings": {

            "foreground": "#FFCB6B"

          }

        },

        {

          "scope": ["punctuation.section.embedded"],

          "settings": {

            "foreground": "#EE8CF0"

          }

        },

        {

          "scope": ["keyword.control"],

          "settings": {

            "fontStyle": "italic"

          }

        }

      ]

    }

  },

  "editor.codeActionsOnSave": {

    "source.fixAll.eslint": true,

    "source.fixAll.stylelint": true

  },

  "files.associations": {

    "*.json": "jsonc"

  }

}


Instalar Powershell 7

Instalar Powershell Version 7 -------------------------------------- $> winget search powershell $> winget install Microsoft.Powershe...