- 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
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')) { |
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
/** | |
* Get critical CSS and class names for elements matching a selector | |
*/ | |
function getCriticalCSS(selector) { | |
try { | |
const elements = document.querySelectorAll(selector); | |
const classNames = new Set(); |
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 styled from '@emotion/styled'; | |
const Loader = styled.div` | |
position: relative; | |
`; | |
const Flex = styled.div` | |
display: flex; | |
flex-wrap: nowrap; |
NewerOlder