looking blame process delay booting
Terminal:
systemd-analyze blame


looking dependent process
Terminal:
systemctl show -p Requires lvm2-monitor.service


Terminal:
systemctl disable NetworkManager-wait-online.service





if you want see all services starting when loading your system then do this:


Terminal:
nano /etc/default/grub

in variable

Terminal:
GRUB_CMDLINE_LINUX_DEFAULT=

and remove of  only

Terminal:
quiet splash

run this command

Terminal:
update-grub










install manage keyring
Terminal:
sudo pacman -S seahorse


search the application



change the password keyring (sorry for the picture are ubuntu, but seahorse is same application)





write old password





now type password in blank





accept use unencrypted passwords




That’s it! Restart your computer for the setting to take effect. Next time you launch Chrome or Chromium browser, you should not see keyring request.




Source: https://www.fosslinux.com/2561/how-to-disable-keyring-in-ubuntu-elementary-os-and-linux-mint.htm


it is very easy hehe

change in your .env

this QUEUE_DRIVER=redis

for this QUEUE_DRIVER=sync





Terminal:
sudo pacman -S cpupower

Terminal:
systemctl start cpupower && systemctl enable cpupower

check type driver
Terminal:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver

if is intel_pstate


you should be this:
Terminal:
nano /etc/default/grub

replace for this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_pstate=disable "


Terminal:
sudo update-grub


you need restart the computer
Terminal:
sudo reboot

when start yout computer again
Terminal:
 sudo cpupower frequency-set -d 1.20Ghz -u 2.20Ghz -g powersave -r
and should be change the frequency and gobernator

check changes
Terminal:
cpupower frequency-info

make permanent configuration
Terminal:
 sudo nano /etc/default/cpupower


restart you computer
Terminal:
sudo reboot

check changes
Terminal:
cpupower frequency-info

BONUS

install tool
Terminal:
sudo pacman -S msr-tools

script disable turbo-boost cpu
https://gitlab.com/cirelramos/oh-my-zsh/raw/master/turbo-boost.sh

change permisson execute
Terminal:
sudo chmod +x ~/turbo-boost.sh
execute disable
Terminal:
sudo  ~/.oh-my-zsh/turbo-boost.sh disable

execute enable
Terminal:
sudo  ~/.oh-my-zsh/turbo-boost.sh enable

check changes
Terminal:
cpupower frequency-info

Manager cpupower




Source:

https://wiki.archlinux.org/index.php/CPU_frequency_scaling_(Espa%C3%B1ol)

https://unix.stackexchange.com/questions/424602/is-it-possible-to-set-a-constant-lowest-cpu-frequency-under-the-modern-pstate

https://lenovopress.com/lp0826.pdf

https://askubuntu.com/questions/613498/automatic-switching-between-performance-and-powersave-mode-on-plugging-in-out-th


link https://www.powtoon.com/home/?

connect to docker



configure cli interpeter



configure image




configure remote interprete



global config


or specifc network






run testunit





composer



phpunit






test result















Step 1: Create Authentication SSH-Kegen Keys on – (192.168.0.12)

First login into server 192.168.0.12 with user tecmint and generate a pair of public keys using following command.
Terminal:
ssh-keygen -t rsa


Step 2: Create .ssh Directory on – 192.168.0.11
Use SSH from server 192.168.0.12 to connect server 192.168.0.11 using sheena as user and create .sshdirectory under it, using following command.
Terminal:
ssh sheena@192.168.0.11 mkdir -p .ssh


Step 3: Upload Generated Public Keys to – 192.168.0.11Use SSH from server 192.168.0.12 and upload new generated public key (id_rsa.pub) on server 192.168.0.11under sheena‘s .ssh directory as a file name authorized_keys.
Terminal:
cat .ssh/id_rsa.pub | ssh sheena@192.168.0.11 'cat >> .ssh/authorized_keys'

Step 4: Set Permissions on – 192.168.0.11Due to different SSH versions on servers, we need to set permissions on .ssh directory and authorized_keys file
Terminal:
ssh sheena@192.168.0.11 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"


Step 5: Login from 192.168.0.12 to 192.168.0.11 Server without Password
Terminal:
ssh sheena@192.168.0.11








Package.json configuration

First of all you have to create a new Debugging script like this:

Terminal:
"debug": "node $NODE_DEBUG_OPTION node_modules/.bin/webpack-dev-server --config ./path/to/webpack.config.js"


webpack configuration

You have to add this command line:
Terminal:
devtool: 'eval-source-map'


Editor configuration

and then you have to cofigurate your IDE:

NPM


JAVASCRIPT REMOTE debug



configure browser debug




example package.json and webpack https://drive.google.com/file/d/1MRDj84Yn9iHAP-u_OeDJLshxB_82sdOV/view?usp=sharing







Source: https://stackoverflow.com/questions/38800164/intellij-idea-how-can-i-create-an-breakpoint-that-debug-webpack


https://blog.jetbrains.com/webstorm/2018/01/working-with-vue-js-in-webstorm/

















run adb devices

Terminal:
adb devices





Run adb tcpip 5555

Terminal:
adb tcpip 5555



Disconnect your device (remove the USB cable). Go to the Settings -> About phone -> Status to view the IP address of your phone.

Terminal:
adb connect <IP address of your device>:5555   


Terminal:
adb devices  











install package
Terminal:
sudo apt-get install id3v2
check metadata just now
Terminal:
id3v2 -l some_file.mp3
erease metada
Terminal:
id3v2 -s some_file.mp3
erease metada
Terminal:
id3v2 -s some_file.mp3

all files a folder
Terminal:
for i in *.mp3; do echo "Processing $i"; id3v2 -s "$i"; done


Fuente: https://askubuntu.com/questions/26911/erase-and-rewrite-mp3-id3-tags






  1. I see all foreign keys to a table or column: SELECT TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME = '<table>'
  2. Distinc values in 2 columns from 2 tables:SELECT
     SELECT DISTINCT t1.`ID_POSTULANTE` AS T1_ID_POSTULANTE FROM
      `tb_postulante` t1 INNER JOIN `aulaasignada` as t2
       ON t1.`ID_POSTULANTE` != t2.`ID_POSTULANTE`
       GROUP BY T1_ID_POSTULANTE
  3. values duplicate for one column: SELECT certificado_id_correlativo FROM t_certificado_digital group by certificado_id_correlativo having count(*) >= 2
  4. update from select: update tabla1 inner join tabla2 on tabla1.id_tabla2 = tabla2.id set tabla1.campo=tabla2.language
  5. update year sales: update sales set created_at=DATE_FORMAT(created_at, '2020-%m-%d') where YEAR(created_at) < 2020 ;
  6. update month sales: update sales set created_at=DATE_FORMAT(created_at, '%y-10-%d') where MONTH(created_at) < 10 ;
  7. update day sales: update sales set created_at=DATE_FORMAT(created_at, '%y-%m-25') where DAY(created_at) < 10 and MONTH(created_at) = 10 ;
  8. update month invertval sales: update sales set created_at=date_add(created_at, interval 1 month);
  9. insert select:
    1. INSERT INTO generic_stage.entity_items (
          client_id,
          item_type_id,
          item_id,
          action_type,
          action_result,
          marketing_flag,
          creation_timestamp
      )
      SELECT
          '300001' AS client_id,
          8 AS item_type_id,
          cg.id AS item_id,
          1 AS action_type,
          1 AS action_result,
          0 AS marketing_flag,
          NOW() AS creation_timestamp -- use NOW() for current timestamp
      FROM generic_source.item_source cg
      WHERE source_provider_id = 7;











source:








create this script and run:


Terminal:
#!/bin/bash

sudo mount -o remount,size=40G,noatime /tmp
echo "Done. Please use 'df -h' to make sure folder size is increased."


source: https://gist.github.com/ertseyhan/618ab7998bdb66fd6c58





















Terminal:
nano /etc/systemd/system/test.service


[Unit]                                                                                                                                            
Description=test_job                                                                                                                              
                                                                                                                                                  
[Service]                                                                                                                                         
Type=oneshot                                                                                                                                      
ExecStart=/usr/bin/php /tmp/run.php 




Terminal:
nano /etc/systemd/system/test.timer

[Unit]                                                                                                                                            
Description=test                                                                                                                                  
                                                                                                                                                  
[Timer]                                                                                                                                           
OnUnitActiveSec=10s                                                                                                                               
OnBootSec=10s                                                                                                                                     
                                                                                                                                                  
[Install]                                                                                                                                         
WantedBy=timers.target


Terminal:
systemctl daemon-reload

Terminal:
systemctl start test.timer

Terminal:
systemctl list-timers --all

Source:

https://unix.stackexchange.com/questions/198444/run-script-every-30-min-with-systemd






how run docker sonarqube:
Terminal:
docker run -d --name sonarqube sonarqube


descargar el sonar client:
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner

unzip
Terminal:
unzip sonar-scanner-cli-*

Terminal:
sudo cp -a sonar-scanner-* /opt/

Terminal:
sudo chmod -R 775 /opt/sonar-scanner-*

Terminal:
sudo ln -s /opt/sonar-scanner-3.2.0.1227-linux/bin/sonar-scanner /bin/sonar-scanner

edit values default
Terminal:
sudo nano /opt/sonar-scanner-3.2.0.1227-linux/conf/sonar-scanner.properties



# Required metadata
sonar.projectKey=testproject
sonar.projectName=testproject
sonar.projectVersion=1.0.0

# Path to the parent source code directory.
sonar.sources=app

# Language
# We've commented this out, because we want to analyse both PHP and Javascript
#sonar.language=php

# Encoding of the source code
sonar.sourceEncoding=UTF-8

# Reusing PHPUnit reports
sonar.php.coverage.reportPath=ci/codeCoverage/codeCoverage.xml
sonar.php.tests.reportPath=ci/testResults.xml

# Here, you can exclude all the directories that you don't want to analyse.
# As an example, I'm excluding the Providers directory
sonar.exclusions=app/Providers/**

# Additional parameters
#sonar.my.property=value




add config your proyect in the file sonar-project.properties


# Required metadata
sonar.projectKey=project1
sonar.projectName=project1
sonar.projectVersion=1.0.0

# Path to the parent source code directory.
sonar.sources=app

# Language
# We've commented this out, because we want to analyse both PHP and Javascript
sonar.language=php

# Encoding of the source code
sonar.sourceEncoding=UTF-8

# Reusing PHPUnit reports
sonar.php.coverage.reportPath=ci/codeCoverage/codeCoverage.xml
sonar.php.tests.reportPath=ci/testResults.xml

# Here, you can exclude all the directories that you don't want to analyse.
# As an example, I'm excluding the Providers directory
sonar.exclusions=vendor/**

# Additional parameters
#sonar.my.property=value


run in your proyect


Terminal:
sonar-scanner -e -X





first install jdk7 in your system

Terminal:
sudo apt-get install jdk7-openjdk



download ireport
 https://community.jaspersoft.com/project/jasperreports-library/releases

now you run with jdk7
Terminal:
./ireport --jdkhome "/usr/lib/jvm/java-7-jdk/"


it is all :)