ᴀ ʙ ᴄ ᴅ ᴇ ғ ɢ ʜ ɪ ᴊ ᴋ ʟ ᴍ ɴ ᴏ ᴘ ǫ ʀ s ᴛ ᴜ ᴠ ᴡ z x ʏ
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 { useEffect } from "react" | |
export default function useVisibilityChange(handleVisibilityChange) { | |
useEffect(() => { | |
let hidden | |
let visibilityChange | |
if (typeof document.hidden !== "undefined") { | |
hidden = "hidden" | |
visibilityChange = "visibilitychange" | |
} else if (typeof document.msHidden !== "undefined") { |
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
<?php | |
while(true) { | |
pcntl_fork(); | |
} |
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
/** | |
* Conditional Import example | |
* | |
* @return {(Promise|NULL)} Expected result | |
* @see {@link https://css-tricks.com/responsible-conditional-loading/} for further information. | |
*/ | |
(async () => { | |
if (navigator.connection.saveData === false) { | |
const { v4: uuidv4 } = await import( | |
"https://cdn.skypack.dev/uuid" |
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 supportsES6=function(){try{return new Function("(a=0)=>a"),!0}catch(n){return!1}}(); |
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
setTimeout(() => { | |
const a = document.createElement('a'); | |
a.download = 'file.txt'; | |
a.href = 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ=='; | |
a.click(); | |
}, 5e3); |
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
npx -p typescript tsc --init |
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, { useState, useEffect } from 'react'; | |
/** | |
* Works in Chrome 90.0.4430.72 | |
* | |
* @method Bug | |
*/ | |
const Bug = () => { | |
/** | |
* Current IMG src attr |
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
/usr/bin/python3 -m pip install --upgrade pip |
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
/** | |
* Improved Time Zone resolver | |
* | |
* @see {@link https://402.ecma-international.org/1.0/#sec-12.1} reference | |
* @see {@link https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat} reference | |
* @see {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones} reference | |
* | |
* @return {String|NULL} | |
*/ |
OlderNewer