Preact is a fast 3kB alternative to React with the same modern API.
This example uses shows how to use Material UI 4 with Preact X and Preact CLI 3.
git clone blah preact-mui
let widget = await createWidget(); | |
if (!config.runsInWidget) { | |
await widget.presentSmall(); | |
} | |
Script.setWidget(widget); | |
Script.complete(); | |
async function createWidget(items) { |
const resolve = require('resolve'); | |
/** | |
* @typedef {{ | |
basedir: string; | |
browser?: boolean; | |
defaultResolver: (request: string, options: ResolverOptions) => string; | |
extensions?: readonly string[]; | |
moduleDirectory?: readonly string[]; | |
paths?: readonly string[]; |
Preact is a fast 3kB alternative to React with the same modern API.
This example uses shows how to use Material UI 4 with Preact X and Preact CLI 3.
git clone blah preact-mui
// go get golang.org/x/net/webdav | |
// go run files.go -openbrowser -http=127.0.0.1:9090 | |
package main | |
import ( | |
"context" | |
"flag" | |
"net/http" | |
"log" | |
"fmt" |
version: '3' | |
services: | |
db: | |
image: mariadb | |
restart: unless-stopped | |
volumes: | |
- /mnt/data/mysql:/var/lib/mysql | |
env_file: | |
- db.env |
# Makefile for backup routines | |
# 2021 ckunte | |
# | |
SOURCE=/home/Chyetanya.Kunte | |
# current (and archived) projects | |
PROJECTS=prj | |
# past projects | |
REFERENCES=ref | |
# Here's an example: make cprj IP="10.0.1.19" | |
# ref: https://stackoverflow.com/questions/15500204/ |
#if placed at the end of your .zshrc this wil automaticly start and attach tmux. | |
#When you attach from a new session, it wil close your previous terminal. | |
#start tmux defaultly | |
if which tmux >/dev/null 2>&1; then | |
#if not inside a tmux session, and if no session is started, start a new session | |
test -z "$TMUX" && (tmux a -d || tmux new-session) | |
fi |
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
Creating a self-signed CA
$ openssl req -new -x509 -nodes -days 365 -out CA.crt -keyout CA.key -subj '/CN=Test CA'
$ openssl req -new -nodes -out cert.req -keyout cert.key -subj '/CN=*.openstack.local'
$ openssl x509 -req -in cert.req -CA CA.crt -CAkey CA.key -CAcreateserial -days 365 -out cert.crt
View the expiration date for an x509 certificate. Unless passing the -days
flag when creating the CA cert, it will default to '30', as defined by the default_crl_days
option in /etc/ssl/openssl.cnf.
$ openssl x509 -text -in CA.crt
{ | |
"USD": { | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |