This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function validaDNI(dni){ | |
onlyNumbersDNI = dni.toString().replace(/\D/g, ''); | |
let ex_regular_dni = /^\d{7,8}(?:[-\s]\d{4})?$/; | |
if(ex_regular_dni.test(onlyNumbersDNI) == true && !(/[a-zA-Z]/g.test(dni)) && onlyNumbersDNI === dni.replace(/(\d)[\s.]+(?=\d)/g, '$1')){ | |
alert('Dni corresponde'); | |
return true; | |
}else{ | |
alert('Dni erroneo, formato no válido'); | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
display: | |
- platform: lcd_pcf8574 | |
dimensions: 16x2 | |
address: 0x27 | |
lambda: |- | |
it.printf(0, 0, "%c", 0xDF); | |
----- This print degree symbol on LCD (0xDF) at col 0, row 0. ------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Git bash as admin | |
git config --global user.name "my super name" | |
git config --global user.email [email protected] | |
git config --global alias.superlog "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all" | |
git config --global alias.alias "! git config --get-regexp ^alias\. | sed -e s/^alias\.// -e s/\ /\ =\ /" | |
git config --global core.autocrlf false | |
git config --system core.autocrlf false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hyper-V Server side (Powershell): | |
Enable-PSRemoting | |
Enable-WSManCredSSP -Role server | |
Client side: | |
Go to start menu -> Turn windows features on or off -> Enable "Hyper-V GUI Management Tools" | |
Go to start menu -> Open Powershell as Administrator: | |
Enable-PSRemoting | |
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "HyperVServerDNS" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker stop $(docker ps -aq) | |
docker rm $(docker ps -aq) | |
docker volume rm $(docker volume ls -q) | |
## IF NEED DELETE DOCKER COMPLETLY ## | |
rm /var/lib/docker/ |