以下の二つの crate を使って簡単なものを書いた:
あまりちゃんとした事はやってなくて、とりあえず入力されたキーを別のキーに変換できるか試してみた程度。
以下の二つの crate を使って簡単なものを書いた:
あまりちゃんとした事はやってなくて、とりあえず入力されたキーを別のキーに変換できるか試してみた程度。
# -*- coding: utf-8 -*- | |
"""Example combination of FastAPI and Pydantic with aiosql and aiosqlite. | |
This module demonstrates the minimum viable integration approach for putting | |
together a few components: | |
- FastAPI. This provides a very high-performance and type-driving approach to | |
building APIs in Python | |
- Pydantic. A powerful data validation library. | |
- aiosql. Inspired by annosql and originally Clojure's yeSql, a way to programatically, |
# Configuration for Alacritty, the GPU enhanced terminal emulator. | |
# Import additional configuration files | |
# | |
# Imports are loaded in order, skipping all missing files, with the importing | |
# file being loaded last. If a field is already present in a previous import, it | |
# will be replaced. | |
# | |
# All imports must either be absolute paths starting with `/`, or paths relative | |
# to the user's home directory starting with `~/`. |
I hereby claim:
To claim this, I am signing this object:
curl \ | |
-X POST \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Authorization: token <ACCESS_TOKEN_HERE>" \ | |
https://api.github.com/repos/<ORG_OR_USERNAME>/<REPO>/actions/workflows/<FILENAME_OR_WORKFLOW_ID>/dispatches \ | |
-d '{"ref":"refs/heads/master"}' |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.@startuml OAuth basic flow with auth code and access token | |
skinparam monochrome true | |
skinparam defaultFontSize 14 | |
' plantuml: https://plantuml.com/sequence-diagram | |
' source: https://gist.github.com/hrchu/d88efb56e72534a1233d16f36eb3e3e9 | |
title OAuth basic flow with auth code and access token | |
actor "You/Browser" as b | |
participant "slack.com" as s |
Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.
Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple
) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic
module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.
Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.
Older Keychron keyboards (those not based on QMK) use the hid_apple
driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.
Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.
Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill
) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.
Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr
import asyncio | |
import http.server | |
import http.client | |
class LogHTTPHandler(http.server.SimpleHTTPRequestHandler): | |
log_file = open('access.log', 'w', 1) | |
def log_message(self, format, *args): | |
self.log_file.write( | |
f"{self.client_address[0]} - - [{self.log_date_time_string()}] {format % args}\n" |