Skip to content

Instantly share code, notes, and snippets.

View gustavcaves's full-sized avatar

gustavcaves

View GitHub Profile
@gustavcaves
gustavcaves / heroes-with-desc.js
Created February 28, 2023 22:39 — forked from Klerith/heroes-with-desc.js
Una colección de Super Héroes
export const heroes = [
{
'id': 'dc-batman',
'superhero':'Batman',
'publisher':'DC Comics',
'alter_ego':'Bruce Wayne',
'first_appearance':'Detective Comics #27',
'characters':'Bruce Wayne'
},
{
@gustavcaves
gustavcaves / Navbar.js
Created February 27, 2023 15:40 — forked from Klerith/Navbar.js
Un NavBar de Bootstrap rápido para el curso de React de cero a experto
import { Link, NavLink } from 'react-router-dom';
export const Navbar = () => {
return (
<nav className="navbar navbar-expand-sm navbar-dark bg-dark">
<Link
className="navbar-brand"
to="/"
@gustavcaves
gustavcaves / vite-testing-config.md
Created December 15, 2022 22:20 — forked from Klerith/vite-testing-config.md
Vite + Jest + React Testing Library - Configuraciones a seguir

Instalación y configuracion de Jest + React Testing Library

En proyectos de React + Vite

  1. Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react 
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
  1. Opcional: Si usamos Fetch API en el proyecto:
Funcion pedir_viaje()
Escribir 'Elija su Ciudad de destino: '
Leer ciudad_destino
Escribir 'Elija la Fecha de su Viaje: '
Leer fecha_de_viaje
Escribir 'Elija la hora de su Viaje: '
Leer hora_de_viaje
FinFuncion
Funcion disponibilidad(bus_avion)
@gustavcaves
gustavcaves / if_anidados_tablas_de_verdad.js
Created April 26, 2022 12:57
Enviar Transferencia entre Bancos
// Banco Cliente
// Cuenta Cliente
// Saldo Cliente
// Banco Destino
// Cuenta Destino
// Hora de transferencia [0-23]
// Transferir 1M USD
// Condiciones Obligatorias de Transferencia:
@gustavcaves
gustavcaves / pagination.html
Created March 23, 2021 19:40 — forked from hcosta/pagination.html
Menú de paginación con Bootstrap 4 para ListView en Django
<!-- Menú de paginación -->
{% if is_paginated %}
<nav aria-label="Page navigation">
<ul class="pagination justify-content-center">
{% if page_obj.has_previous %}
<li class="page-item ">
<a class="page-link" href="?page={{ page_obj.previous_page_number }}">&laquo;</a>
</li>
{% else %}
<li class="page-item disabled">
@gustavcaves
gustavcaves / profile_form.html
Created March 19, 2021 19:39 — forked from hcosta/profile_form.html
Revisión del formulario de perfil con avatar
{% extends 'core/base.html' %}
{% load static %}
{% block title %}Perfil{% endblock %}
{% block content %}
<style>.errorlist{color:red;} label{display:none}</style>
<main role="main">
<div class="container">
<div class="row mt-3">
<div class="col-md-9 mx-auto mb-5">
<form action="" method="post" enctype="multipart/form-data">{% csrf_token %}
@gustavcaves
gustavcaves / login.html
Created March 16, 2021 21:47 — forked from hcosta/login.html
Revisión del template para identificarse en el curso Django 2
{% extends 'core/base.html' %}
{% load static %}
{% block title %}Iniciar sesión{% endblock %}
{% block content %}
<style>.errorlist{color:red;}</style>
<main role="main">
<div class="container">
<div class="row mt-3">
<div class="col-md-9 mx-auto mb-5">
<form action="" method="post">{% csrf_token %}
@gustavcaves
gustavcaves / custom_ckeditor.md
Created March 15, 2021 20:36 — forked from hcosta/custom_ckeditor.md
Código para conseguir ancho adaptativo en django-ckeditor

static/pages/css/custom_ckeditor.css

.django-ckeditor-widget, .cke_editor_id_content {
    width: 100% !important;
    max-width: 821px !important;
}

Inyectar en pages_menu.html

{% extends 'core/base.html' %}
{% load static %}
{% block title %}Borrar página{% endblock %}
{% block content %}
{% include 'pages/includes/pages_menu.html'%}
<main role="main">
<div class="container">
<div class="row mt-3">
<div class="col-md-9 mx-auto">
<div>