Skip to content

Instantly share code, notes, and snippets.

View andrei-cacio's full-sized avatar
👀
🤔 👀

Andrei Cacio andrei-cacio

👀
🤔 👀
View GitHub Profile
<ClickOutside onClick=() => 'Close tooltip'>
<span>
A helpful tooltip!
</span>
</ClickOutside>
@andrei-cacio
andrei-cacio / edge-paste.html
Last active September 16, 2019 19:11
Pasting hello world in Edge
<html>
<body>
<!--StartFragment-->
<span style="
display: inline !important;
float: none;
background-color: rgb(255, 255, 255);
color: rgb(34, 34, 34);
font-family: arial,sans-serif;
font-size: 13.33px;
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
Hello world
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
Hello world
</body>
</html>
@andrei-cacio
andrei-cacio / pasting-firefox.html
Created August 29, 2019 10:32
Pasting Hello World in Firefox
Hello world
@andrei-cacio
andrei-cacio / safari-paste.html
Created August 29, 2019 10:31
Pasting hello world in Safari
<span style="
font-family: -webkit-standard;
font-style: normal;
font-variant-caps: normal;
font-weight: normal;
letter-spacing: normal;
orphans: auto;
text-align: start;
text-indent: 0px;
text-transform: none;
@andrei-cacio
andrei-cacio / chrome-paste.html
Last active August 29, 2019 10:30
Pasting hello world in Chrome
<meta charset='utf-8'>
<span style="
color: rgb(0, 0, 0);
font-family: Times;
font-size: medium;
font-style: normal;
font-variant-ligatures: normal;
font-variant-caps: normal;
font-weight: 400;
letter-spacing: normal;
@andrei-cacio
andrei-cacio / db.js
Created June 22, 2019 07:34
nodeschool-db
export default [
{
id: 54590991,
node_id: "MDEwOlJlcG9zaXRvcnk1NDU5MDk5MQ==",
name: "cluj",
full_name: "jsheroes/cluj",
private: false,
owner: {
login: "jsheroes",
id: 16759725,
@andrei-cacio
andrei-cacio / click-outide.jsx
Last active March 28, 2019 17:43
Clickoutside updated
import React, { Component, useEffect, useCallback } from "react";
function ClickOutsideH({ children, onClick }) {
const refs = React.Children.map(children, () => React.createRef());
const handleClick = useCallback(e => {
const isOutside = refs.every(ref => {
return !ref.current.contains(e.target);
});
if (isOutside) {
onClick();
@andrei-cacio
andrei-cacio / clickoutside.jsx
Last active March 8, 2019 08:26
ClickOutside Hook
import React, { Component, useEffect } from "react";
function ClickOutside({ children, onClick }) {
const refs = React.Children.map(children, () => React.createRef());
const handleClick = e => {
const isOutside = refs.every(ref => {
return !ref.current.contains(e.target);
});
if (isOutside) {
onClick();