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
| // @flow | |
| import { useLayoutEffect } from 'react'; | |
| const mountCountMap = new Map<string, number>(); | |
| const updateRootClassNameUsageCount = (className, setter: (count: number) => number) => { | |
| const oldCount = mountCountMap.get(className) || 0; | |
| const count = setter(oldCount); | |
| mountCountMap.set(className, count); |
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
| bookmarklet = () => | |
| (async () => { | |
| // https://gist.github.com/subtleGradient/9b1eb9b6356c861ee3b7395c11bab9d2 | |
| /*! | |
| Copyright 2020 Thomas Aylott <oblivious@subtlegradient.com> | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
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
| javascript: (async () => { | |
| const TOP = window.opener || window.top; | |
| const document = TOP.document; | |
| function nextFrame() { | |
| return new Promise(done => { | |
| requestAnimationFrame(done); | |
| }); | |
| } |
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
| javascript: (() => { | |
| async function download(fileName, data) { | |
| const content = | |
| typeof data === "string" || data instanceof Blob | |
| ? data | |
| : JSON.stringify(data); | |
| const downloadURL = window.URL.createObjectURL( | |
| new Blob([content], { type: "application/json" }) | |
| ); | |
| const anchor = document.createElement("a"); |
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
| [...document.querySelectorAll('td img')] | |
| .map((img) => [img, img.closest('td')]) | |
| .map(([img, td]) => [img, td.innerText || td.parentElement.nextElementSibling.cells[td.cellIndex].innerText]) | |
| .map(([img, text]) => [img.src, ...text.split(/\s+/).reverse()]) | |
| .map(([src, type, ...name]) => [type, name.reverse().join(' '), src]) |
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/env node --experimental-modules | |
| /* eslint-disable no-console */ | |
| import { execSync } from 'child_process'; | |
| process.env.ROOT_VIEW_PATH = `src/common/components/views/RootView.js`; | |
| const exec = script => { | |
| console.log(`$ ${script}`); |
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
| Cypress.Commands.add('waitForAllAPIs', waitForAllAPIs); | |
| let requestCount; | |
| beforeEach(() => { | |
| requestCount = 0; | |
| cy.server({ | |
| onRequest() { | |
| requestCount++; |
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
| [...$$('img')].map(img => { | |
| const imageFilename = img.getAttribute('src'); | |
| const [type, ...name] = img.parentNode.parentNode.parentNode.parentNode.nextSibling.nextSibling.textContent.trim().split('\n').map(string=>string.trim()).reverse(); | |
| return `cp '${imageFilename}' '${name.reverse().join(' ')}.${imageFilename.split('.').reverse()[0]}'`; | |
| }).join('\n') |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Canon\EOS Utility] | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Canon\DPP] | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Canon\ZoomBrowser EX] | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Canon\PhotoStitch | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Canon\EOS Capture] | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Canon\EOSViewerUtility] | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Canon\ZoomBrowser EX\Install] |
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
| package com.subtlegradient.android.thinpushclient; | |
| import java.io.File; | |
| import java.lang.reflect.Method; | |
| import android.annotation.TargetApi; | |
| import android.app.Activity; | |
| import android.content.BroadcastReceiver; | |
| import android.content.Context; | |
| import android.content.Intent; |