Discover gists
View update_notifications.yaml
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
| blueprint: | |
| name: Update notifications | |
| description: Send notifications for new updates and install or skip on action | |
| homeassistant: | |
| min_version: '2022.4.0' | |
| domain: automation | |
| input: | |
| update_entities: | |
| name: Update entities | |
| description: >- |
View db.sql
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
| INSERT INTO reservaciones (nombre, apellido, hora, fecha, servicios) VALUES | |
| ('Juan', 'De la torre', '10:30:00', '2021-06-28', 'Corte de Cabello Adulto, Corte de Barba' ), | |
| ('Antonio', 'Hernandez', '14:00:00', '2021-07-30', 'Corte de Cabello Niño'), | |
| ('Pedro', 'Juarez', '20:00:00', '2021-06-25', 'Corte de Cabello Adulto'), | |
| ('Mireya', 'Perez', '19:00:00', '2021-06-25', 'Peinado Mujer'), | |
| ('Jose', 'Castillo', '14:00:00', '2021-07-30', 'Peinado Hombre'), | |
| ('Maria', 'Diaz', '14:30:00', '2021-06-25', 'Tinte'), | |
| ('Clara', 'Duran', '10:00:00', '2021-07-01', 'Uñas, Tinte, Corte de Cabello Mujer'), | |
| ('Miriam', 'Ibañez', '09:00:00', '2021-07-01', 'Tinte'), |
View Bash Colors
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
| BLACK="\033[0;30m" | |
| DARK_GRAY="\033[1;30m" | |
| LIGHT_GRAY="\033[0;37m" | |
| WHITE="\033[1;37m" | |
| BLUE="\033[0;34m" | |
| LIGHT_BLUE="\033[1;34m" | |
| GREEN="\033[0;32m" | |
| LIGHT_GREEN="\033[1;32m" |
View 01-generate-ed25519-ssh-key.sh
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
| #!/bin/bash | |
| # generate new personal ed25519 ssh key | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>" | |
| # generate new host cert authority (host_ca) ed25519 ssh key | |
| # used for signing host keys and creating host certs | |
| ssh-keygen -t ed25519 -f manta_host_ca -C manta.network | |
| eval "$(ssh-agent -s)" |
View debian_8.sh
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
| ### debian 8 (jessie) | |
| mkdir /etc/systemd/system/serial-getty@ttyS0.service.d &&\ | |
| echo '[Service] | |
| Environment="TERM=xterm"' > /etc/systemd/system/serial-getty@ttyS0.service.d/xterm.conf | |
| systemctl daemon-reload &&\ | |
| systemctl enable serial-getty@ttyS0.service &&\ | |
| systemctl start serial-getty@ttyS0.service &&\ | |
| systemctl status serial-getty@ttyS0.service |
View git.md
GIT
Estados
- Modificado (modified);
- Preparado (staged/index)
- Consolidado (comitted);
Ajuda
View Clean Code.md
- Use descriptive and obvious names.
- Don't use abbreviations, use full English words.
playeris better thanplr. - Name things as directly as possible.
wasCalledis better thanhasBeenCalled.notifyis better thandoNotification. - Name booleans as if they are yes or no questions.
isFirstRunis better thanfirstRun. - Name functions using verb forms:
incrementis better thanplusOne.unzipis better thanfilesFromZip. - Name event handlers to express when they run.
onClickis better thanclick. - Put statements and expressions in positive form.
isFlyinginstead ofisNotFlying.lateintead ofnotOnTime.- Lead with positive conditionals. Avoid
if not something then ... else ... end.
- Don't use abbreviations, use full English words.
- If we only care about the inverse of a variable, turn it into a positive name.
missingValueinstead ofnot hasValue.
View jq-cheetsheet.md
Processing JSON using jq
jq is useful to slice, filter, map and transform structured json data.
Installing jq
On Mac OS
brew install jq
NewerOlder
