Skip to content

Instantly share code, notes, and snippets.

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

Manuel García manudevcode

🏠
Working from home
View GitHub Profile
@poacosta
poacosta / fibonacci.cs
Last active February 24, 2023 16:46
n-th fibonacci (3 ways)
namespace Fibonacci;
/// <summary>
/// The Fibonacci sequence is a sequence of numbers where a number is the sum of the two preceding numbers.
/// The first 10 numbers in the Fibonacci sequence are: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34.
/// </summary>
public static class Fibonacci
{
/// <summary>
/// Fibonacci in a recursive version
@Klerith
Klerith / SocketContext.js
Last active June 4, 2024 13:29
Todo lo necesario para conectarnos a nuestro socket server - SocketContext, SocketProvider, useSocket
import React from 'react';
import { createContext } from 'react';
import { useSocket } from '../hooks/useSocket'
export const SocketContext = createContext();
export const SocketProvider = ({ children }) => {
const { socket, online } = useSocket('http://localhost:8080');