Skip to content

Instantly share code, notes, and snippets.

View DavidAlejandro18's full-sized avatar
🏠
Working from home

David Tovar DavidAlejandro18

🏠
Working from home
  • Proaxis
  • Monterrey, Nuevo Leon, México
View GitHub Profile
@DavidAlejandro18
DavidAlejandro18 / config-cisco.md
Last active May 27, 2024 00:36
Comando básicos para la correcta configuración de dispositivos en una red usando Cisco IOS.

CONFIGURACIÓN BÁSICA PARA DISPOSITIVOS DE RED CISCO

Pasos para configurar el nombre de algún dispositivo de red Cisco

Switcth# configure terminal
Switcth(config)# hostname NOMBRE DEL DISPOSITIVO
NOMBRE DEL DISPOSITIVO(config)#
@DavidAlejandro18
DavidAlejandro18 / index.js
Created July 30, 2022 06:06
Función que obtiene la unidad imaginaria de una potencia imaginaria
function getUnidadImaginaria(potencia) {
let potenciasImaginarias = {
0: '1',
1: 'i',
2: '-1',
3: '-i',
4: '1'
};
let restante = 0;
@DavidAlejandro18
DavidAlejandro18 / heroku_add_environment_variable.txt
Created July 7, 2021 05:28
Comandos para agregar nuevas variables de entorno en Heroku
VER VARIABLES DE ENTORNO CON HEROKU CLI
>heroku config
DECLARAR Y SUBIR UNA NUEVA VARIABLE DE ENTORNO
>heroku config:set <nombre de la variable>="<valor de la variable>"
@DavidAlejandro18
DavidAlejandro18 / git_tags_push.txt
Last active July 7, 2021 04:33
Comando de git para agregar y publicar tags al proyecto.
git tag -a v0.0.1 42373eb -m "Mensaje" ------> Agregar un tag al commit especificado junto a un mensaje
git tag -a v0.0.1 -m "Mensaje" ------> Agregar un tag al commit actual junto a un mensaje
SUBIR TAGS
git push --tags
@DavidAlejandro18
DavidAlejandro18 / git_alias.txt
Last active July 7, 2021 04:33
Comandos de git para agregar los alias para mejor productividad.
git config --global alias.lg "log --oneline --decorate --all --graph"
git config --global alias.s "status -s -b"
@DavidAlejandro18
DavidAlejandro18 / index.js
Created March 26, 2021 18:48
Código para ocultar el modal de inicio de sesión de Quora cuando no tienes cuenta.
eval(function(p,a,c,k,e,d){while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+c.toString(a)+'\\b','g'),k[c])}}return p}('g 9(){4.6("#2 .3-8").7[0].5="f: e;";4.6("#2 .3-8").7[1].5="d: c;";4.6("#2 .3-8").7[1].5="b: a;"}9();',17,17,'||root|q|document|style|querySelector|children|box|hackQuora|initial|position|unset|filter|none|display|function'.split('|')))
@DavidAlejandro18
DavidAlejandro18 / index.js
Created February 24, 2021 06:08
Código para imprimir un 'arbol de navidad básico'.
function christmas_tree(num) {
let numRows = num;
for (let i = 1; i <= numRows; i++) {
let row = "";
for (let j = i; j < numRows; j++) {
row += " ";
}
for (let k = 1; k <= (2 * i - 1); k++) {
@DavidAlejandro18
DavidAlejandro18 / index.html
Last active February 23, 2021 05:14
HTML: Código básico
<!doctype html>
<html lang="en">
<head>
<title>Mi primer Gist en Github</title>
</head>
<body>
<p>Cuerpo del documento</p>
</body>
</html>