Skip to content

Instantly share code, notes, and snippets.

@0
0 / bluetooth_serial.md
Last active February 6, 2024 15:17
Connecting a Bluetooth device for serial communication on Arch Linux.

The following are instructions for connecting a Bluetooth device for serial communication on Arch Linux using BlueZ 5.31.

Prerequisites

The following packages are required:

  • bluez: bluetoothd
  • bluez-utils: bluetoothctl, rfcomm

Keybase proof

I hereby claim:

  • I am 0 on github.
  • I am 0_0 (https://keybase.io/0_0) on keybase.
  • I have a public key ASDLXFbFtcCeD6vYtHwlR1M19TQhwTOOq93dfIqz9F6d3go

To claim this, I am signing this object:

@0
0 / misspell.py
Created October 8, 2017 08:38
Find misspelled words in text that contains many non-words.
#!/usr/bin/env python3
"""
A wrapper around difflib.get_close_matches to make it easy to find misspelled
words in text that contains many non-words.
For regular text, where every letter sequence must be a dictionary word,
checking spelling is straightforward. Technical text, such as documentation or
code comments, may contain many valid non-words (e.g. function names) and
deliberate nonsense example strings. As a consequence, there tend to be many
@0
0 / arxiv.js
Last active August 4, 2022 02:09
Script to convert Zotero items from Journal Article to Preprint.
/*
* Previously, preprints were added to Zotero as items of the "Journal Article"
* type, but it now has a dedicated "Preprint" item type. This script finds all
* articles that look like arXiv preprints and converts them to the new type. If
* your items have categories in the publication name, you may need to remove
* them.
*
* Select all the articles you want to convert, go to Tools -> Developer -> Run
* JavaScript, check "Run as async function", paste this script on the left side,
* and press "Run". It may take a while, but eventually the right side should