Getting started:
Related tutorials:
| 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 |
Getting started:
Related tutorials:
| /** Pure CSS wave effect **/ | |
| div.wave{ | |
| position: relative; | |
| width: 100%; | |
| } | |
| div.wave > span{ | |
| float: left; | |
| width: 10%; | |
| height: 200px; | |
| animation: animate 1.5s ease-in-out alternate infinite; |
| <?php | |
| /* | |
| Plugin Name: Rewrite Rule Tutorials | |
| */ | |
| add_action( 'init', 'pmg_rewrite_add_rewrites' ); | |
| function pmg_rewrite_add_rewrites() | |
| { | |
| add_rewrite_endpoint( 'json', EP_PERMALINK ); | |
| add_rewrite_rule( |
| # Replace any brackets with real values | |
| # Try to ssh in to DREAMHOST (ensure it no longer asks for a PW); you may want to restart Terminal | |
| ssh [user]@[host] | |
| cd ~ | |
| mkdir [mydomain_com].git | |
| cd [mydomain_com].git | |
| git init --bare | |
| vi hooks/post-receive | |
| # Enter the code from the "post-receive" file (in this gist); save + quit |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |