- Linux Mint 20.2 x86_64
- Kernel 5.4.0-135-generic
sudo apt-get remove exfat-fuse exfat-utils
const useIsVirtualKeyboardVisible = () => { | |
const [isVirtualKeyboardVisible, setIsVirtualKeyboardVisible] = React.useState(false); | |
React.useEffect(() => { | |
// probably incomplete, good enough for me | |
const inputTypesThatOpenTheVirtualKeyboard = ['text', 'email', 'password', 'number', 'search']; | |
const handleFocus = (event: Event) => { | |
if ( | |
event.target instanceof HTMLTextAreaElement || |
const tesseractTsvToJson = (tsvFilename, jsonFilename) => { | |
console.log(`> tsvToJson ${tsvFilename} => ${jsonFilename}`); | |
const tsvLines = fs.readFileSync(tsvFilename, 'utf-8').trim().split('\n').reverse(); | |
/** @type {any} */ | |
const json = {pages: []}; | |
// discard header | |
tsvLines.pop(); |
sudo apt-get remove exfat-fuse exfat-utils
Some notes to adjust the MX4000 parameters for retro gaming. These notes apply to my model (SW 2.0)
$ uname -r
From:
Code:
Protocol: NEC1
Device: 2
SubDevice: 160
Func. OBC HEX EFC
const crypto = require('crypto'); | |
const urlBase64 = require('urlsafe-base64'); | |
function generateVAPIDKeys() { | |
const curve = crypto.createECDH('prime256v1'); | |
curve.generateKeys(); | |
return { | |
publicKey: urlBase64.encode(curve.getPublicKey()), | |
privateKey: urlBase64.encode(curve.getPrivateKey()) |
/* | |
* Original file: | |
* https://github.com/40thieves/webpack-sentry-plugin/blob/master/src/index.js | |
*/ | |
const request = require('request-promise'); | |
const fs = require('fs'); | |
const crypto = require('crypto'); | |
const {green, yellow, red} = require('colors/safe'); | |
const Queue = require('promise-queue'); |
const RWS = require('reconnecting-websocket'); | |
const rws1 = new RWS('wss://echo.websocket.org'); | |
const rws2 = new RWS('wss://echo.websocket.org', undefined); | |
rws1.onopen = () => console.log('ws1 connected'); | |
rws2.onopen = () => console.log('ws2 connected'); |