This file contains hidden or 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
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Challenge: Catwalk</title> | |
<style> | |
#cat { | |
position: absolute; | |
left: 0px; |
This file contains hidden or 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
#No modifiques commits publicos | |
#NUNCA RESCRIBIR LA HISTORIA DE RAMAS PUBLICAS(push) - SOLO HACERLO EN RAMAS LOCALES (git rebase | git commit --amend) | |
#HEAD es normalmente el ultimo commit del repositorio(master o main), si no te has movido a otro lado | |
#Los commits normales tienen un solo padre, un merge tiene 2 padres. | |
https://www.youtube.com/watch?v=Uszj_k0DGsg | |
https://www.freecodecamp.org/news/git-sim/ | |
https://learngitbranching.js.org/ | |
https://runestone.academy/ns/books/published/opensource/sec_git_branching.html?mode=browsing | |
herramientas visuales: |
This file contains hidden or 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
[alias] | |
a = add # Add file contents to the index | |
ai = add --interactive # Add modified contents in the working tree interactively to the index. | |
############## | |
b = branch | |
ba = branch --all # List both remote-tracking branches and local branches. | |
bav = branch --all --verbose # When in list mode, show sha1 and commit subject line for each head, along with relationship to upstream branch (if any) | |
bd = branch --delete # Delete a branch. The branch must be fully merged in its upstream branch, or in HEAD if no upstream was set with --track or --set-upstream-to. | |
bdd = branch -D # Shortcut for --delete --force. | |
bm = branch --move # Move/rename a branch and the corresponding reflog. |
This file contains hidden or 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
Dockerfile -> build -> IMAGEN -> run -> CONTENEDOR | |
sudo apt install docker.io docker-compose | |
Acceso a internet dentro de los contenedores basados en debian/ubuntu, ejemplo mariadb imagen: | |
sudo apt update; sudo apt upgrade -y | |
sudo apt install iputils-ping | |
sudo apt install iproute2 | |
#################################################################### | |
dive: A tool for exploring each layer in a docker image https://blogs.cisco.com/developer/container-image-layers-1 | |
$ dive stage0:latest |
This file contains hidden or 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
VAGRANT terminos: | |
Box (recomendadas: hashicorp, debian*) | |
Vagrantfile (define el tipo de máquina, cómo configurarla y aprovisionarla) | |
Provider (virtualbox, vmware, hyper-v, qemu) | |
Provisioner (permite instalar y configurar software dentro de la VM, shell, chef, puppet, ansible) | |
VAGRANT Comandos Basicos: | |
vagrant version | |
vagrant --help |
This file contains hidden or 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
## Configurar DHCP router cisco multiples interfaces | |
### Comandos | |
enable | |
conf t | |
int g0/0 | |
ip address 192.168.1.1 255.255.255.0 | |
no shut | |
exit |
This file contains hidden or 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
## Habilitar acceso remoto SSH a switch cisco | |
enable | |
conf t | |
hostname SW-1 | |
enable secret class | |
line console 0 | |
password cisco |
This file contains hidden or 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
Configurando HTTPS letsencrypt con cerbot en apache | |
########################################################### | |
sudo snap install --classic certbot | |
sudo ln -s /snap/bin/certbot /usr/bin/certbot | |
sudo certbot --apache | |
########################################################### | |
REDIRECIONAR HTTP A HTTPS | |
/etc/apache2/sites-available/000-default-le-ssl.conf | |
NameVirtualHost *:80 |
This file contains hidden or 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
#CREAR NUEVO USUARIO Y AGREGARLO AL GRUPO SUDO: | |
sudo adduser [USER] | |
sudo usermod -aG sudo [USER] | |
id [USER] | |
#GENERAR LLAVES SSH EN LOCAL Y ENVIARLAS AL SERVER: | |
ssh-keygen -b 4096 -t rsa | |
ssh-copy-id -i ~/.ssh/id_rsa.pub [USER]@[IP] | |
#VERIFICAR QUE SE SUBIO LA LLAVE: |
OlderNewer