Init project vitejs
react typescript
npm create vite@latest Then follow the prompts!
tailwindcss + vite: https://tailwindcss.com/docs/guides/vite
Build docker image, production React + Typescript + Tailwinds + ViteJS | |
add to vite.config.ts: | |
server: { | |
port: 9393, | |
strictPort: true, | |
host: true, | |
origin: "http://0.0.0.0:9393", | |
}, |
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | |
// README at: https://github.com/devcontainers/templates/tree/main/src/debian | |
{ | |
"name": "Debian", | |
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | |
"image": "mcr.microsoft.com/devcontainers/base:bullseye", | |
"features": { | |
"ghcr.io/devcontainers/features/go:1": {}, | |
"ghcr.io/devcontainers/features/node:1": {}, | |
"ghcr.io/devcontainers/features/php:1": {}, |
confusion about path sdk using FVM, about global env, and per project: | |
https://github.com/leoafarias/fvm/issues/599 | |
will fix with this: | |
export FLUTTER_HOME="$HOME/fvm/default" | |
proxy_flutter() { | |
local flutter_exec | |
if [[ -x "./.fvm/flutter_sdk/bin/flutter" ]]; then |
Init project vitejs
react typescript
npm create vite@latest Then follow the prompts!
tailwindcss + vite: https://tailwindcss.com/docs/guides/vite
copy ssh | |
$ssh-copy-id [email protected] | |
install docker | |
$ sudo apt update | |
$ sudo apt install apt-transport-https ca-certificates curl software-properties-common | |
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
$ echo "deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
# >>> conda initialize >>> | |
# !! Contents within this block are managed by 'conda init' !! | |
__conda_setup="$('/Users/indralesmana/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" | |
if [ $? -eq 0 ]; then | |
eval "$__conda_setup" | |
else | |
if [ -f "/Users/indralesmana/miniconda3/etc/profile.d/conda.sh" ]; then | |
. "/Users/indralesmana/miniconda3/etc/profile.d/conda.sh" | |
else |
# Raw Data Download from Github (1-10) | |
When downloading data from Github in your application and the content path is in the following format: | |
`https://github.com/prust/wikipedia-movie-data/raw/master/movies.json` | |
To download the data via HTTP, you can replace `https://github.com` with `https://raw.githubusercontent.com`. | |
The modified content path will look like this: |
Dev container note | |
Disable Signing for the Current Repository: | |
git config commit.gpgSign false | |
backup and restore volume: | |
docker run --rm \ | |
-v ubuntu:/backup-volume \ | |
-v "$(pwd)":/backup \ | |
busybox \ |
{ | |
"models": [ | |
{ | |
"title": "Ollama", | |
"provider": "ollama", | |
"model": "codegemma:7b", | |
"apiBase": "http://192.168.2.63:11434" | |
}, | |
{ | |
"title": "GFlash", |
Using a CDN for Tailwind CSS directly in your HTML file isn't the best practice for production. Here's a breakdown of the problems and a recommended solution using a build process:
Problems with Direct CDN Inclusion:
Best Practices: Build Process (with Vite or Parcel)