TL;DR
懲りもせずDenoコードリーディング話です
結果: https://twitter.com/L_e_k_o/status/1180148912922824704?s=20
Leko (https://twitter.com/L_e_k_o)
#!/usr/bin/env node | |
const readline = require("node:readline"); | |
async function guess(feedbacks) { | |
// You can use `console.error` for debugging. | |
console.error(feedbacks); | |
// Write your solver! | |
return "count"; | |
} |
{"version":1,"notes":"My awesome keymap","documentation":"\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n","keyboard":"crkbd/rev1","keymap":"corone-cherry","layout":"LAYOUT","layers":[["KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_MINS","KC_LCTL","KC_A","KC_S","KC_D","KC_F","KC_G","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_QUOT","KC_LSFT","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","MO(2)","KC_LGUI","MO(1)","KC_SPC","KC_ENT","KC_BSPC","KC_LALT"],["KC_GRV","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_CIRC","KC_AMPR","KC_ASTR","KC_LPRN","KC_RPRN","KC_EQL","KC_LCTL","KC_1","KC_2","KC_3","KC_4","KC_5 |
// OCRライブラリ突っ込む | |
const script = document.createElement('script') | |
script.src = | |
'https://unpkg.com/tesseract.js@v2.0.0-alpha.16/dist/tesseract.min.js' | |
script.onload = () => { | |
// キー入力の模倣をする | |
function sendKey(key) { | |
const event = new KeyboardEvent('keypress', { charCode: key.charCodeAt() }) | |
document.dispatchEvent(event) | |
} |
TL;DR
懲りもせずDenoコードリーディング話です
結果: https://twitter.com/L_e_k_o/status/1180148912922824704?s=20
Leko (https://twitter.com/L_e_k_o)
$ ./wait-for-url.sh localhost:12345
peco_monorepo() { | |
local module_paths=($(node -e 'console.log(module.paths.join(" "))')) | |
local found=0 | |
for module_paths in ${module_paths[@]} | |
do | |
local lerna_bin="$module_paths/.bin/lerna" | |
if [ ! -f $lerna_bin ]; then | |
continue | |
fi |
const licenses = require('./licenses.json') | |
const osiApprovedLicenses = licenses.filter(l => l.keywords.includes('osi-approved')) |
import assert from './assert'
import { runInTimezone } from './runInTimezone'
const offset = await runInTimezone('Asia/Tokyo', () => new Date().getTimezoneOffset())
assert.strictEquals(offset, -540)
// @flow | |
import { h, render, Text, Fragment, Component } from "ink"; | |
import Spinner from "ink-spinner"; | |
import chalk from "chalk"; | |
import emoji from "node-emoji"; | |
import { Provider, connect } from "ink-redux"; | |
import { createStore } from "redux"; | |
const Line = ({ text }) => ( | |
<div> |