Skip to content

Instantly share code, notes, and snippets.

View felixdusengimana's full-sized avatar
👀
Ice on face, wooooh!

Felix DUSENGIMANA felixdusengimana

👀
Ice on face, wooooh!
View GitHub Profile
@KristofferEriksson
KristofferEriksson / useCookie.ts
Created January 29, 2024 09:16
A hook to easily read and update browser cookies. Plus, it auto-updates your component when cookie values change
import { useEffect, useState } from "react";
type UseCookieReturnType = {
cookie: string | undefined;
setCookie: (value: string, days?: number) => void;
};
const useCookie = (cookieName: string): UseCookieReturnType => {
const getCookie = (name: string): string | undefined => {
const value = `; ${document.cookie}`;
@felixdusengimana
felixdusengimana / CircularQueueArray.cpp
Last active October 20, 2021 07:48
Implementation of circular Queue using linked list and Array in c++
/*implementation of circular queue using array */
#include<iostream>
using namespace std;
int front=-1,rear=-1;
int size=0;
void createQueue(){
cout<<"How many Element you want to create in Queue:: ";