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| /* eslint-disable @typescript-eslint/no-explicit-any */ | |
| import { ComponentType, lazy } from "react"; | |
| /** | |
| * Returns both the component render function and a prefetch function | |
| * | |
| * Example: | |
| * | |
| * ```ts | |
| * import { lazyWithPreload } from "~/utils/lazy_with_preload"; |
| 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 |
| # Where to look for files to backup, and where to store those backups. See | |
| # https://borgbackup.readthedocs.io/en/stable/quickstart.html and | |
| # https://borgbackup.readthedocs.io/en/stable/usage.html#borg-create for details. | |
| location: | |
| # List of source directories to backup (required). Globs and tildes are expanded. | |
| source_directories: | |
| - /home | |
| - /etc | |
| - /var/log/syslog* |
| # 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