This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import { useMousePosition } from "~/hooks/useMousePosition"; | |
/** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */ | |
export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) { | |
const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {}; | |
const [mouseX, mouseY] = useMousePosition(); | |
const positions = { x, y, h, w, mouseX, mouseY }; | |
return ( | |
<div |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) ==== Autossh using systemd ==== | |
Example from | |
https://gist.github.com/drmalex07/c0f9304deea566842490 | |
2) ============= | |
Install autossh |
I hereby claim:
- I am ebauger on github.
- I am ebauger (https://keybase.io/ebauger) on keybase.
- I have a public key ASBFPNguplWTpibxzfLafUwOw9eSVvwPhNS2PZx4zScY5wo
To claim this, I am signing this object:
Some times you may face the case in which you have a list of lists (or tuples) as follows
lists_list = [ [1, 2], [3, 4], [5, 6] ]
tuples_list = [ (1, 2, 3), (4, 5, 6) ]
and you want to convert them into a single list as follows
alist = [1, 2, 3, 4, 5, 6]
You can use loops and comprehensions of course!