It's 2024. You should use tsup instead of this.
🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
✨ .d.ts bundle + type-checking
| #!/usr/bin/env python | |
| import math | |
| # Function: numberFromWord | |
| # - wordString: a String representative of the word | |
| # Returns: | |
| # - number: an Integer representative of the screen based on map | |
| def numberFromWord(wordStr): | |
| phoneMap = {"a": 2, "b": 2, "c": 2, |
It's 2024. You should use tsup instead of this.
🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
✨ .d.ts bundle + type-checking
useViewportScroll is a great way to create a parallax effect as the page scrolls. In some cases however, we only want to scroll when an element is in the viewport area.
So for example, if we have a "landscape" scene, and want to animate the Sun object only when it's in view, we start with our useViewportScroll implementation:
function Sun(props) {
const { scrollY, scrollYProgress } = useViewportScroll();| #!/bin/bash | |
| palindromeGif() { | |
| if [[ -n "$1" ]]; then | |
| ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
| if [[ $2 != '--big' ]]; then | |
| a=$(ls out-static* | wc -l) | |
| for p in $(ls -r out-static*); | |
| do |
| // Implementation in ES6 | |
| function pagination(c, m) { | |
| var current = c, | |
| last = m, | |
| delta = 2, | |
| left = current - delta, | |
| right = current + delta + 1, | |
| range = [], | |
| rangeWithDots = [], | |
| l; |