Install plugin Whisper for Obsidian
plugin's settings:
- API-key = sk-0
- API-URL = http://127.0.0.1:8000/inference
- language = en
- recording folder = rec
- transcription folder = rec_notes
plugin's settings:
| import os | |
| os.environ['OPENAI_API_KEY'] = '<Your OpenAI API Key>' | |
| # See here on how to find your Zotero info: https://github.com/urschrei/pyzotero#quickstart | |
| ZOTERO_USER_ID = '<Your Zotero User ID>' | |
| ZOTERO_API_KEY = '<Your Zotero API Key>' | |
| ZOTERO_COLLECTION_ID = '<Your Zotero Collection ID>' | |
| question = 'What predictive models are used in materials discovery?' | |
| # The following prompt instruction is injected to limit the number of keywords per query |
For KOReader (or any other APK) to be installed on a Tolino device, the debug menu has to be enabled:
124816 source1123581321 source112358132fb sourceNote: "searching" as in the search for books on the tolino itself (the magnifying glass in the top bar)
| const marpHideSlidesPlugin = (md) => { | |
| md.marpit.customDirectives.local.hide = (value) => ({ | |
| hide: value === 'true', | |
| }) | |
| md.core.ruler.after( | |
| 'marpit_directives_apply', | |
| 'marpit_hide_slides', | |
| (state) => { | |
| let withinSlide = false |
| from qobuz_dl.bundle import Bundle | |
| bundle = Bundle() | |
| app_id = bundle.get_app_id() | |
| secrets = "\n".join(bundle.get_secrets().values()) | |
| print(f"App ID: {app_id}") | |
| print("#" * 20) |
| import network | |
| import socket | |
| import time | |
| import struct | |
| from machine import Pin | |
| NTP_DELTA = 2208988800 | |
| host = "pool.ntp.org" |
| // Tailscale Frontend: It uses tailscale-as-a-library to | |
| // listen on a port, independently from the operating system network, i.e. you | |
| // can run an nginx server on :80 and :443 without impacting the frontend. | |
| // | |
| // set up DNS, e.g.: | |
| // prometheus.ts.zekjur.net A 100.117.6.125 | |
| // | |
| // frontend% TAILSCALE_USE_WIP_CODE=true tailscalefrontend -hostname=srv.example.net -allowed_user=michael@example.net | |
| // | |
| // (first login requires running with TS_LOGIN=1 environment variable to print link for the browser) |
This gist has been superceedes by this small talon cheatsheet suitable for learning beginner commands.
| #define RGB_DI_PIN B2 | |
| #define RGBLED_NUM 1 | |
| // https://github.com/qmk/qmk_firmware/blob/master/docs/ws2812_driver.md | |
| //#define WS2812_TRST_US 280 | |
| //#define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_GRB | |
| #define RGBLIGHT_LIMIT_VAL 63 | |
| #define RGBLIGHT_LAYERS |
Below is a snippet for implementing a combination dial-like mechanism you can use in your QMK keymap. This is useful for entering long passwords using a rotary encoder, or activating secret macros etc. The algorithm looks for a sequence of clockwise (CW) or counter-clockwise (CCW) turns of the rotary encoder for a certain number of ticks/clicks. It executes the macro if all turns are successfully completed, or resets to the beginning if a turn is too long or too short.
For this example we will output a string as a macro, like entering a password. In this case it is "TA DA!":
void emit_passphrase_secret(void) {