Skip to content

Instantly share code, notes, and snippets.

View ThorondorManwe's full-sized avatar
🤖
Focusing

Carlos Rangel ThorondorManwe

🤖
Focusing
View GitHub Profile
@laracasts
laracasts / Game.php
Created January 3, 2020 16:10
Bowling Game Kata
<?php
namespace App;
class Game
{
/**
* The number of frames in a game.
*/
const FRAMES_PER_GAME = 10;
@laracasts
laracasts / StringCalculator.php
Created January 8, 2020 21:20
String Calculator Kata
<?php
namespace App;
use Exception;
class StringCalculator
{
/**
* The maximum number allowed.
@Klerith
Klerith / react-index.html
Created May 6, 2020 19:07
Introducción a React
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<!-- Cargat React -->
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
@Klerith
Klerith / heroes.js
Created May 7, 2020 17:40
Un pequeño arreglo de héroes para hacer ejercicios
const heroes = [
{
id: 1,
name: 'Batman',
owner: 'DC'
},
{
id: 2,
name: 'Spiderman',
owner: 'Marvel'
@Klerith
Klerith / heroes-with-desc.js
Last active June 16, 2024 03:29
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'
},
{
@Klerith
Klerith / Instalaciones-React.md
Last active June 18, 2024 14:25
Instalaciones recomendadas para mi curso de React de cero a experto
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link href="https://fonts.googleapis.com/css2?family=Raleway" rel="stylesheet">
<link rel="stylesheet" href="../static/css/styles.css">
</head>
<body>
<div class="wrapper">

Firebase Setup For House Marketplace

  1. Create Firebase Project
  2. Create "web" app within firebase to get config values"
  3. Install firebase in your project "npm i firebase
  4. Create a config file in your project
  5. Add authentication for email/password and Google
  6. Create a user from Firebase
  7. Enable Firestore
  8. Add rules for firestore
@Klerith
Klerith / vite-testing-config.md
Last active June 19, 2024 02:02
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:
@Klerith
Klerith / templateSlice.js
Last active May 28, 2024 14:02
Cascaron para crear Redux Slices rápidamente
import { createSlice } from '@reduxjs/toolkit';
export const templateSlice = createSlice({
name: 'name',
initialState: {
counter: 10
},
reducers: {
increment: (state, /* action */ ) => {
//! https://react-redux.js.org/tutorials/quick-start