pnpm init @vitejs/app app -- --template react-ts
cd app
pnpm install
git init && git add -A && git commit -m "initial commit"
#pnpm run build
pnpm run dev
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.
# Generate a unique private key (KEY) | |
sudo openssl genrsa -out mydomain.key 2048 | |
# Generating a Certificate Signing Request (CSR) | |
sudo openssl req -new -key mydomain.key -out mydomain.csr | |
# Creating a Self-Signed Certificate (CRT) | |
openssl x509 -req -days 365 -in mydomain.csr -signkey mydomain.key -out mydomain.crt | |
# Append KEY and CRT to mydomain.pem |
# If you already have an haproxy.cfg file, you can probably leave the | |
# global and defaults section as-is, but you might need to increase the | |
# timeouts so that long-running CLI commands will work. | |
global | |
ssl-default-bind-options ssl-min-ver TLSv1.2 | |
ssl-default-bind-ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 | |
maxconn 4096 | |
# log stdout local0 debug | |
defaults |
[Unit] | |
Description=Document Server Daemon | |
[Service] | |
Type=forking | |
Environment=NODE_VERSION=12 | |
WorkingDirectory=/home/your_user/your_node_app_dir | |
ExecStart=/home/your_user/.nvm/nvm-exec npm start | |
StandardOutput= | |
User=your_user |
FROM node:8-alpine | |
# the client version we will download from bumpx repo | |
ENV CLIENT_FILENAME instantclient-basic-linux.x64-12.1.0.1.0.zip | |
# work in this directory | |
WORKDIR /opt/oracle/lib | |
# take advantage of this repo to easily download the client (use it at your own risk) | |
ADD https://github.com/bumpx/oracle-instantclient/raw/master/${CLIENT_FILENAME} . |
Most of us won’t be able to use/deploy JDK 8 in production for a looong time. But that shouldn’t stop us from using it, right?
It should be possible to sneak in JDK 8 in the back way, the same way we snuck in Groovy and other libraries we wanted to use.
# Generate a unique private key (KEY) | |
sudo openssl genrsa -out mydomain.key 2048 | |
# Generating a Certificate Signing Request (CSR) | |
sudo openssl req -new -key mydomain.key -out mydomain.csr | |
# Creating a Self-Signed Certificate (CRT) | |
openssl x509 -req -days 365 -in mydomain.csr -signkey mydomain.key -out mydomain.crt | |
# Append KEY and CRT to mydomain.pem |
#Container Resource Allocation Options in docker-run You have various options for controlling resources (cpu, memory, disk) in docker. These are principally via the docker-run command options.
##Dynamic CPU Allocation
-c, --cpu-shares=0
CPU shares (relative weight, specify some numeric value which is used to allocate relative cpu share)
##Reserved CPU Allocation
//: Check divisible by 3 and 5 with GameplayKit Rule System | |
import GameplayKit | |
let divisibleBy3Rule = GKRule(blockPredicate: { system in | |
(system.state["value"] as! Int) % 3 == 0 | |
}, action: { system in | |
system.assertFact("divisibleBy3and5", grade: 0.5) | |
system.assertFact("divisibleBy3", grade: 1) | |
}) |