added a lot of new scripts

This commit is contained in:
Dobromir Popov
2023-10-18 19:31:00 +00:00
parent 47e8b0105c
commit f82836130a
9 changed files with 106 additions and 28 deletions

13
dev/next-cart-app.md Normal file
View File

@ -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

2
dev/openInterpreter.md Normal file
View File

@ -0,0 +1,2 @@
conda activate aider
export OPENAI_API_KEY=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

View File

@ -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
docker cp ai-petals-bootstrap-1:/bootstrap1.id /home/azureuser/containers/petals-dht/bootstrap1.id
## backup container:
docker commit <container_id_or_name> <backup_image_name>
docker save -o <path/to/save/image.tar> <backup_image_name>
docker commit gw02webserver-2fauth-1 2fauth
docker save -o <path/to/save/image.tar> 2fauth
# restore
docker load -i <path/to/save/image.tar>
docker run -d --name <new_container_name> <backup_image_name>

View File

@ -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

View File

@ -21,4 +21,7 @@ mkdir
# folder size:
du -hs
du -hs
# find big files
find / -type f -size +100M

39
linux/python env conda.md Normal file
View File

@ -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

View File

@ -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]}

View File

@ -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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

View File

@ -3,4 +3,20 @@
#store credentals
git config --global credential.helper store
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