Skip to content

Instantly share code, notes, and snippets.

View pladaria's full-sized avatar
👾

Pedro Ladaria pladaria

👾
View GitHub Profile
@pladaria
pladaria / Logitec-z960-IR-codes.md
Created December 12, 2019 11:35
Logitech Speaker System Z906 remote IR codes
@pladaria
pladaria / clean-up-boot-partition-ubuntu.md
Created December 20, 2019 09:45 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@pladaria
pladaria / bo-mx4000-sw2.0-notes.md
Last active January 23, 2022 16:02
Bang & Olufsen MX4000 SW 2.0 Notes
@pladaria
pladaria / vitashell-usb-mount-linux.md
Last active January 19, 2023 11:28
How to mount PSVita in linux using VitaShell and a USB cable
  • Linux Mint 20.2 x86_64
  • Kernel 5.4.0-135-generic

Remove exfat-fuse and exfat-utils packages

sudo apt-get remove exfat-fuse exfat-utils

Install exfat-linux.

@pladaria
pladaria / tesseract-tsv-to-json.js
Created April 8, 2023 11:33
Tesseract OCR tsv to json converter
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();
@pladaria
pladaria / use-is-virtual-keyboard-open.ts
Last active April 29, 2024 18:12
Detect if Virtual Keyboard is open in web app using React
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 ||
@pladaria
pladaria / jodoverse.md
Last active March 15, 2025 19:35
Jodoverse