A vanilla JS fork of Lettering.js. Follow along in the tutorial video at https://gomakethings.com/converting-a-jquery-plugin-to-vanilla-js-lettering.js/.
Pass in a selector for the elements you want to run Vanilla Lettering.js on.
A vanilla JS fork of Lettering.js. Follow along in the tutorial video at https://gomakethings.com/converting-a-jquery-plugin-to-vanilla-js-lettering.js/.
Pass in a selector for the elements you want to run Vanilla Lettering.js on.
| 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 |
| let _ = global._ = require("lodash"); | |
| let Benchmark = global.Benchmark = require("benchmark"); | |
| let Promise = require("bluebird"); | |
| let { Map } = require("immutable"); | |
| let { produce } = require("immer"); | |
| function getItems(count) { | |
| let id = 1; |
| // takes a {} object and returns a FormData object | |
| var objectToFormData = function (obj, form, namespace) { | |
| var fd = form || new FormData(); | |
| var formKey; | |
| for (var property in obj) { | |
| if (obj.hasOwnProperty(property)) { | |
| var propValue = obj[property]; |
You can run either of the following snippets in your terminal to generate a markdown list of your VS Code extensions.
code --list-extensions | awk '{ print "* [" $1 "](https://marketplace.visualstudio.com/items\?itemName\=" $1 ")" }'
npx https://gist.github.com/elijahmanor/7f9762a4c2296839ad33e33513e88043
NOTE: You can append | pbcopy to either of the above commands to pipe the output to your Mac's copy/paste buffer.
Note:
When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.
If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:
Dear all Github friends,
I moved this gist to the Github repository.
Following this repository https://github.com/nijicha/install_nodejs_and_yarn_homebrew
| #!/bin/bash | |
| # Script for cleaning MacOS related trash (dot files and folders) | |
| # from a removable disk and unmounting that disk. | |
| # Script does sanity checks, should be safe, but use at your own risk! | |
| # Newest version can always be found at https://gist.github.com/pawelszydlo/5eacd49d7e57bce71e96171e9fad1cd2 | |
| # Display a dialog box. |
| #!/bin/bash | |
| mkdir -p ~/Pictures/Wallpapers/unsplash | |
| rm -f ~/Pictures/Wallpapers/unsplash/"$(date +%F)".png | |
| curl -s -L -o ~/Pictures/Wallpapers/unsplash/"$(date +%F)".png "https://unsplash.it/2560/1600/?random" > /dev/null | |
| osascript -e "tell application \"System Events\" to set picture of every desktop to \"~/Pictures/Wallpapers/unsplash/$(date +%F).png\"" | |
| killall Dock |