diff --git a/dev/next-cart-app.md b/dev/next-cart-app.md new file mode 100644 index 0000000..15198dd --- /dev/null +++ b/dev/next-cart-app.md @@ -0,0 +1,13 @@ +# reinsall prisma +npm uninstall -g @prisma/cli +npm uninstall @prisma/client + +npm install -g @prisma/cli +npm install @prisma/client + +# reinstall packages/ rebuild project +rm -rf node_modules +rm package-lock.json +npm install + + diff --git a/dev/openInterpreter.md b/dev/openInterpreter.md new file mode 100644 index 0000000..a129ead --- /dev/null +++ b/dev/openInterpreter.md @@ -0,0 +1,2 @@ +conda activate aider +export OPENAI_API_KEY=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 diff --git a/linux/docker commands.md b/linux/docker commands.md index cc6a7e9..370c2c6 100644 --- a/linux/docker commands.md +++ b/linux/docker commands.md @@ -1,3 +1,17 @@ # copy file from container to host: > docker cp [CONTAINER_ID]:[SOURCE_PATH] [DESTINATION_PATH] -docker cp ai-petals-bootstrap-1:/bootstrap1.id /home/azureuser/containers/petals-dht/bootstrap1.id \ No newline at end of file +docker cp ai-petals-bootstrap-1:/bootstrap1.id /home/azureuser/containers/petals-dht/bootstrap1.id + + +## backup container: +docker commit +docker save -o + + +docker commit gw02webserver-2fauth-1 2fauth +docker save -o 2fauth + +# restore +docker load -i +docker run -d --name + diff --git a/linux/install and run app from cmd.md b/linux/install and run app from cmd.md new file mode 100644 index 0000000..a83073a --- /dev/null +++ b/linux/install and run app from cmd.md @@ -0,0 +1,11 @@ + +# if we have mono + +# get an app/executable +wget -O nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe +# create shell alias +alias nuget="mono /path/to/your/nuget.exe" +# resource the shell +source ~/.bashrc # Or the appropriate file name if not using bashrc +# run the new command +nuget diff --git a/linux/linux disk.md b/linux/linux disk.md index fe74afb..eaf57db 100644 --- a/linux/linux disk.md +++ b/linux/linux disk.md @@ -21,4 +21,7 @@ mkdir # folder size: -du -hs \ No newline at end of file +du -hs + +# find big files +find / -type f -size +100M diff --git a/linux/python env conda.md b/linux/python env conda.md new file mode 100644 index 0000000..a94c904 --- /dev/null +++ b/linux/python env conda.md @@ -0,0 +1,39 @@ +setup miniconda: + +# create env +conda create --name petals #python=3.10 +conda create --prefix D:\conda\envs\node + +conda activte +conda install pip +pip install -r requirements.txt +#pip install petals +pip install aider-chat +export OPENAI_API_KEY=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 +set OPENAI_API_KEY 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 + + +# remove > Remove all packages in environment +conda deactivate +conda env remove --name petals +# Remove all packages from environment `myenv` and the environment itself:: +conda remove -n myenv --all + + +# conda install node +conda install -c conda-forge nodejs +conda update -c conda-forge nodejs +conda install -c conda-forge nodejs=18 +# uninstall +conda uninstall nodejs + + +# get package location +pip show {package[pip]} + +# install next (node) +npm install next + + +#} install nextjs +npm install next@latest react@latest react-dom@latest \ No newline at end of file diff --git a/linux/python env.md b/linux/python env.md deleted file mode 100644 index 33c0dda..0000000 --- a/linux/python env.md +++ /dev/null @@ -1,24 +0,0 @@ -setup miniconda: - - -conda create --name petals #python=3.10 -conda activte -conda install pip -pip install -r requirements.txt -#pip install petals -pip install aider-chat -export OPENAI_API_KEY=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 - - -# remove > -conda deactivate -conda env remove --name petals - - -# conda install node -conda install -c conda-forge nodejs -conda update -c conda-forge nodejs - -# get package location -pip show {package[pip]} - diff --git a/linux/setup aider.md b/linux/setup aider.md index ffc70ba..44aae3b 100644 --- a/linux/setup aider.md +++ b/linux/setup aider.md @@ -1,8 +1,11 @@ in conda env: pip install aider-chat +# latest +python -m pip install git+https://github.com/paul-gauthier/aider.git # isntall ctags # > sudo apt update && apt install universal-ctags + or: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" @@ -12,7 +15,8 @@ brew install universal-ctags /home/linuxbrew/.linuxbrew/bin/ctags export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin/ctags - +# RUN +> aider # personal export OPENAI_API_KEY=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 aider -3 --no-auto-commits diff --git a/linux/setup git.sh b/linux/setup git.sh index c4a4674..c1899fe 100644 --- a/linux/setup git.sh +++ b/linux/setup git.sh @@ -3,4 +3,20 @@ #store credentals -git config --global credential.helper store \ No newline at end of file +git config --global credential.helper store + + + +#add upstream (when forked) +git remote add upstream https://github.com/petals-infra/health.petals.dev.git + + +# merge upstream +git fetch upstream +git checkout main +git merge upstream/main --allow-unrelated-histories +git commit -m "Merged upstream/main" + +# remove upstream +git remote remove upstream +git remote -v