Skip to content

Instantly share code, notes, and snippets.

View rikardbq's full-sized avatar
:shipit:

Rikard Bergqvist rikardbq

:shipit:
View GitHub Profile
@Martinnord
Martinnord / useCookie.ts
Last active December 18, 2019 14:07
Hook for mange cookie with universal-cookie lib
import { useState } from "react";
import Cookies, { CookieSetOptions, Cookie } from "universal-cookie";
export const useCookie = (key: string) => {
const cookies = new Cookies();
const [value, setValue] = useState(() => {
if (Boolean(cookies.get(key))) {
return cookies.get(key);
}
@JBlond
JBlond / bash-colors.md
Last active June 27, 2024 14:23 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple