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 { RefObject } from 'react' | |
| import useEvent from './useEvent' | |
| type Ref = RefObject<Element> | |
| const useBlur = (ref: Ref, callback: () => void) => { | |
| useEvent(ref, 'blur', () => setTimeout(callback)) | |
| } | |
| export default useBlur |
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
| // ==UserScript== | |
| // @name Wired Normalizer | |
| // @namespace https://github.com/bromne/wired-normalizer | |
| // @version 1.3.0 | |
| // @description WIRED.jp の記事に含まれる「ヴ」を、適当なバ行の文字に変換します。 | |
| // @author @bromne, @yuta0801 | |
| // @match *://wired.jp/* | |
| // @grant none | |
| // @require //ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js | |
| // ==/UserScript== |
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
| !(async () => { | |
| document.getElementById('app').style.display = 'none' | |
| document.write('読み込み中...') | |
| const server = 'server_id' | |
| const cors = 'https://cors-anywhere.herokuapp.com/' | |
| const url = cors + 'https://multiplayer.factorio.com/get-game-details/' + server | |
| const data = await fetch(url, { headers: { origin: 'any' } }).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 nativeApLoginStart() { | |
| const [d, a] = installVersionCheck(false) | |
| if (d && a) return | |
| const dialogMap = { | |
| Win: { | |
| IE: '#ieInstallDialog', | |
| Edge: '#edgeInstallDialog', | |
| Chrome: '#chromeInstallDialog', |
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
| TypeScript 1 min █████████████████████ 100.0% |
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
| 🗣 Commented on #7 in yuta0801/scrapbox-reader | |
| 🎉 Merged PR #5 in yuta0801/scrapbox-reader | |
| 🎉 Merged PR #6 in yuta0801/scrapbox-reader | |
| 🗣 Commented on #5 in yuta0801/scrapbox-reader | |
| 🎉 Merged PR #4 in yuta0801/scrapbox-reader |
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
| // Future versions of Hyper may add additional config options, | |
| // which will not automatically be merged into this file. | |
| // See https://hyper.is#cfg for all currently supported options. | |
| module.exports = { | |
| config: { | |
| // choose either `'stable'` for receiving highly polished, | |
| // or `'canary'` for less polished but more frequent updates | |
| updateChannel: 'stable', |
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 getXpath(element) { | |
| if(!element || !element.parentNode) return '' | |
| let xpath = getXpath(element.parentNode) + '/' + element.tagName | |
| const elements = [] | |
| for(const e of element.parentNode.childNodes) { | |
| if(e.tagName == element.tagName) elements.push(e) | |
| } | |
| if(1 < elements.length) { | |
| const i = elements.indexOf(element) | |
| xpath += '[' + (i+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
| @startuml p2p | |
| group クライアント数だけ繰り返す | |
| Uploader -> Server : /:randomにtokenを生成してPOST | |
| Uploader --> Downloader : /:randomを教える | |
| Downloader -> Server : /:randomをGETし:tokenを取得 | |
| group ファイル数分繰り返す | |
| Uploader -> Server : /:random/:tokenをGET | |
| Downloader -> Server : /:random/:tokenに欲しいfileをPOST | |
| Downloader -> Server : /:random/:token/:fileをGET |