Skip to content

Instantly share code, notes, and snippets.

View anubra266's full-sized avatar
💥
Playing vscode...

Abraham anubra266

💥
Playing vscode...
View GitHub Profile
@anubra266
anubra266 / gist:2d40f3ede2bd9b8149458c9fec9dc990
Created February 22, 2022 00:24
Always open chakra UI drawer
https://github.com/chakra-ui/chakra-ui/issues/2893#issuecomment-780143150
@anubra266
anubra266 / favicon.md
Last active July 9, 2021 18:29
Themes svg favicons
<svg>
  <style>
    path { fill: black; }
    @media (prefers-color-scheme: dark) {
      path { fill: white; }
    }
  </style>

 
@anubra266
anubra266 / usage.md
Created June 15, 2021 08:41
tags input
function Usage() {
  const inputStyles = useMultiStyleConfig("Input", { size:'md', variant:'filled' }).field
  const tagStyles = useStyleConfig("InputGroup", { size: 'sm' })
  console.log(tagStyles)  
   
  return (
      <Wrap w="100%" tabIndex="1" __css={inputStyles} display="flex"  align="center" h="auto" py="2" >
      
         <Tag
@anubra266
anubra266 / Readme.md
Created June 2, 2021 00:26
Prevent Input loss of focus when clicking a menu item
$(document).on('mousedown', '#inputMenu li', function (e) {
    $('#input').val($(this).text());
    $('#inputMenu').removeClass('active');
    e.preventDefault();
    return false
});
  
$('#input').on('focusout',function(e) {
 $('#inputMenu').removeClass('active');

Get deps with

npx npm-remote-ls --flatten @chakra-ui/react -d false -o false

NB: Apostrophe must be double quotes

const deps = [
 "@chakra-ui/react@1.6.3",
https://codepen.io/denic/pen/GRoOxbM
@anubra266
anubra266 / app.tsx.md
Created May 26, 2021 11:27
Hauptrolle transitioning NextJs Pages
 import type { AppProps } from "next/app";
import { AnimatePresence, motion } from "framer-motion";
import { ChakraProvider, DarkMode, Box, BoxProps } from "@chakra-ui/react";
import Head from "next/head";

import { theme } from "../theme";
import { PageWrapper } from "../components/PageWrapper";
import { Header } from "../components/Header";
import { Footer } from "../components/Footer";
@anubra266
anubra266 / g.md
Created May 13, 2021 13:39
Generic answer
interface FormProps<T extends Record<string, any>> {
  initialValues: T;
  children: (fields: T) => any
}
@anubra266
anubra266 / install.md
Created May 8, 2021 22:23
Firefox developer edition

chose other install way

  1. Open Terminal Ctrl+Alt+T Download Firefox Developer Edition tar file

    wget https://download.mozilla.org/?product=firefox-aurora-latest-ssl&os=linux64&lang=en-US

  2. Copy tar file to opt sudo cp -rp firefox-35.0a2.en-US.linux-x86_64.tar.bz2

  3. Open opt folder (cd /opt/) and untar file sudo tar xjf firefox-35.0a2.en-US.linux-x86_64.tar.bz2