- iPhone 5, iPhone 5c, iPhone 5s
- iPhone 6, iPhone 6s, iPhone 7, iPhone 8, iPhone SE (2020), iPhone SE (2022)
- iPhone 12 mini, iPhone 13 mini
- iPhone 12, iPhone 12 Pro, iPhone 13, iPhone 13 Pro, iPhone 14, iPhone 14 Pro, iPhone 15, iPhone 15 Pro
- iPhone 11 Pro, iPhone X
- Samsung Galaxy S21 (Dynamic AMOLED 2X, 6.2 inches, 1080 x 2400) Portrait
- Google Pixel (AMOLED, 5 inches, 1080 x 1920) Portrait
- Sony Xperia 1 III (OLED, 6.5 inches, 1644 x 3840) Portrait
This file contains hidden or 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
// https://news.ycombinator.com/topcolors | |
const colors = [ | |
{ | |
value: "#ff6600", | |
name: "Safety Orange", | |
}, | |
{ | |
value: "#00aadd", | |
name: "Mystic Blue", | |
}, |
This file contains hidden or 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
/** | |
* A simple, customizable slug generator for browser-based inputs. | |
* | |
* Features: | |
* - Optionally lowercases text | |
* - Removes special characters | |
* - Filters out stop words | |
* - Removes numeric digits | |
* - Supports dash or underscore delimiters | |
* - Copy-to-clipboard functionality |
This file contains hidden or 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 React from "react" | |
import { Swiper, SwiperSlide } from "swiper/react" | |
import useSWR from "swr" | |
const fetcher = (url) => | |
fetch(url, { | |
headers: { | |
Authorization: `Bearer YOUR_JWT_TOKEN` | |
} | |
}).then((res) => res.json()) |
This file contains hidden or 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
function usePageTransition({ | |
beforeChange, | |
afterChange, | |
done, | |
}) { | |
const startResolverRef = useRef(null); | |
const dataRef = useRef(null); | |
const transitionRef = useRef(null); | |
useLayoutEffect(() => { |
This file contains hidden or 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
const timestamp = getCurrentTimestamp() | |
const startTime = new Date() | |
try { | |
const { status, headers } = await axios.get(site) | |
const { date, trace_id: traceId } = headers | |
const responseTime = new Date() - startTime | |
const log = `${timestamp},${date},${status},${site},${responseTime}ms,${traceId},${headers['cache-control']}\n` | |
await fs.appendFile(logFilePath, log) | |
console.log(`${timestamp}: ${site} - ${responseTime}ms`) | |
} catch (error) { |
This file contains hidden or 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 { useState, useEffect } from 'react'; | |
import { render } from 'ink'; | |
import inquirer from 'inquirer'; | |
import fs from 'fs'; | |
import path from 'path'; | |
import TestRunner from './TestRunner'; | |
const App = () => { | |
const [testPackages, setTestPackages] = useState([]); |
This file contains hidden or 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
/** | |
* React hook to get responsive image dimensions | |
* | |
* DynamicPicture could use the height and width from sources[0] as initial dimensions (SSR)?? | |
* | |
* @param {string} imageUrl - Image src url | |
* @param {object} initialDimensions - Initial dimensions for SSR | |
* @returns {{dimensions: {width: number, height: number}, imageRef}} - Image dimensions and ref | |
*/ | |
const useResponsiveImage = (imageUrl, initialDimensions) => { |
This file contains hidden or 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
// webpagetest-action/index.js | |
const core = require('@actions/core'); | |
const webpagetest = require('webpagetest'); | |
async function run() { | |
try { | |
const domains = core.getInput('domains'); | |
const apiKey = core.getInput('key'); | |
This file contains hidden or 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
// https://www.imdb.com/title/tt1865740/fullcredits | |
const collectData = () => { | |
try { | |
const data = { cast: [], crew: [] }; | |
const fullCredits = document.getElementById('fullcredits_content'); | |
for (const child of fullCredits.children) { | |
if (child.classList.contains('simpleCreditsTable')) { |
NewerOlder