├── .gitignore ├── .gitpod.dockerfile ├── .gitpod.yml ├── .vscode ├── arctictern.py ├── heroku_config.sh ├── init_tasks.sh ├── make_url.py ├── settings.json └── uptime.sh └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | core.Microsoft* 2 | core.mongo* 3 | core.python* 4 | env.py 5 | __pycache__/ 6 | *.py[cod] 7 | node_modules/ 8 | .github/ 9 | cloudinary_python.txt -------------------------------------------------------------------------------- /.gitpod.dockerfile: -------------------------------------------------------------------------------- 1 | FROM gitpod/workspace-base 2 | 3 | RUN echo "CI version from base" 4 | 5 | ### NodeJS ### 6 | USER gitpod 7 | ENV NODE_VERSION=16.13.0 8 | ENV TRIGGER_REBUILD=1 9 | RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | PROFILE=/dev/null bash \ 10 | && bash -c ". .nvm/nvm.sh \ 11 | && nvm install $NODE_VERSION \ 12 | && nvm use $NODE_VERSION \ 13 | && nvm alias default $NODE_VERSION \ 14 | && npm install -g typescript yarn node-gyp" \ 15 | && echo ". ~/.nvm/nvm.sh" >> /home/gitpod/.bashrc.d/50-node 16 | ENV PATH=$PATH:/home/gitpod/.nvm/versions/node/v${NODE_VERSION}/bin 17 | 18 | ### Python ### 19 | USER gitpod 20 | RUN sudo install-packages python3-pip 21 | ENV PYTHON_VERSION 3.12.2 22 | 23 | ENV PATH=$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH 24 | RUN curl -fsSL https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash \ 25 | && { echo; \ 26 | echo 'eval "$(pyenv init -)"'; \ 27 | echo 'eval "$(pyenv virtualenv-init -)"'; } >> /home/gitpod/.bashrc.d/60-python \ 28 | && pyenv update \ 29 | && pyenv install $PYTHON_VERSION \ 30 | && pyenv global $PYTHON_VERSION \ 31 | && python3 -m pip install --no-cache-dir --upgrade pip \ 32 | && python3 -m pip install --no-cache-dir --upgrade \ 33 | setuptools wheel virtualenv pipenv pylint rope flake8 \ 34 | mypy autopep8 pep8 pylama pydocstyle bandit notebook \ 35 | twine \ 36 | && sudo rm -rf /tmp/*USER gitpod 37 | ENV PYTHONUSERBASE=/workspace/.pip-modules \ 38 | PIP_USER=yes 39 | ENV PATH=$PYTHONUSERBASE/bin:$PATH 40 | 41 | # Setup Heroku CLI 42 | RUN curl https://cli-assets.heroku.com/install.sh | sh 43 | 44 | # Setup MongoDB (6.0 from Jammy repos) 45 | RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb && sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb && \ 46 | sudo apt-get install gnupg && \ 47 | curl -fsSL https://www.mongodb.org/static/pgp/server-6.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor && \ 48 | echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list && \ 49 | sudo apt-get update -y && \ 50 | sudo apt-get install -y mongodb-mongosh && \ 51 | sudo apt-get clean -y && \ 52 | sudo apt-get install -y links && \ 53 | sudo rm -rf /var/cache/apt/* /var/lib/apt/lists/* /tmp/* /home/gitpod/*.deb && \ 54 | sudo chown -R gitpod:gitpod /home/gitpod/.cache/heroku/ 55 | 56 | # Setup PostgreSQL 57 | 58 | RUN sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list' && \ 59 | sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 && \ 60 | sudo apt-get update -y && \ 61 | sudo apt-get install -y postgresql-12 62 | 63 | ENV PGDATA="/workspace/.pgsql/data" 64 | 65 | RUN mkdir -p ~/.pg_ctl/bin ~/.pg_ctl/sockets \ 66 | && echo '#!/bin/bash\n[ ! -d $PGDATA ] && mkdir -p $PGDATA && initdb --auth=trust -D $PGDATA\npg_ctl -D $PGDATA -l ~/.pg_ctl/log -o "-k ~/.pg_ctl/sockets" start\n' > ~/.pg_ctl/bin/pg_start \ 67 | && echo '#!/bin/bash\npg_ctl -D $PGDATA -l ~/.pg_ctl/log -o "-k ~/.pg_ctl/sockets" stop\n' > ~/.pg_ctl/bin/pg_stop \ 68 | && chmod +x ~/.pg_ctl/bin/* 69 | 70 | # ENV DATABASE_URL="postgresql://gitpod@localhost" 71 | # ENV PGHOSTADDR="127.0.0.1" 72 | ENV PGDATABASE="postgres" 73 | 74 | ENV PATH="/usr/lib/postgresql/12/bin:/home/gitpod/.nvm/versions/node/v${NODE_VERSION}/bin:$HOME/.pg_ctl/bin:$PATH" 75 | 76 | 77 | # Add aliases 78 | 79 | RUN echo 'alias run="python3 $GITPOD_REPO_ROOT/manage.py runserver 0.0.0.0:8000"' >> ~/.bashrc && \ 80 | echo 'alias heroku_config=". $GITPOD_REPO_ROOT/.vscode/heroku_config.sh"' >> ~/.bashrc && \ 81 | echo 'alias python=python3' >> ~/.bashrc && \ 82 | echo 'alias pip=pip3' >> ~/.bashrc && \ 83 | echo 'alias arctictern="python3 $GITPOD_REPO_ROOT/.vscode/arctictern.py"' >> ~/.bashrc && \ 84 | echo 'alias font_fix="python3 $GITPOD_REPO_ROOT/.vscode/font_fix.py"' >> ~/.bashrc && \ 85 | echo 'alias set_pg="export PGHOSTADDR=127.0.0.1"' >> ~/.bashrc && \ 86 | echo 'alias mongo=mongosh' >> ~/.bashrc && \ 87 | echo 'alias make_url="python3 $GITPOD_REPO_ROOT/.vscode/make_url.py "' >> ~/.bashrc 88 | 89 | # Local environment variables 90 | ENV PORT="8080" 91 | ENV IP="0.0.0.0" 92 | 93 | # Despite the scary name, this is just to allow React and DRF to run together on Gitpod 94 | ENV DANGEROUSLY_DISABLE_HOST_CHECK=true 95 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | image: 2 | file: .gitpod.dockerfile 3 | tasks: 4 | - init: . ${GITPOD_REPO_ROOT}/.vscode/init_tasks.sh 5 | command: /home/gitpod/.pg_ctl/bin/pg_start > /dev/null 6 | - command: . ${GITPOD_REPO_ROOT}/.vscode/uptime.sh & 7 | vscode: 8 | extensions: 9 | - ms-python.python 10 | - formulahendry.auto-close-tag 11 | - eventyret.bootstrap-4-cdn-snippet 12 | - hookyqr.beautify 13 | - matt-rudge.auto-open-preview-panel 14 | - ms-toolsai.jupyter 15 | - ms-toolsai.jupyter-keymap 16 | - ms-toolsai.jupyter-renderers 17 | -------------------------------------------------------------------------------- /.vscode/arctictern.py: -------------------------------------------------------------------------------- 1 | """ 2 | arctictern.py 3 | A little script that does a big migration 4 | """ 5 | 6 | import json 7 | import os 8 | import requests 9 | import shutil 10 | import subprocess 11 | import sys 12 | from os.path import exists 13 | 14 | COLOURS = {"red": "\033[31m", 15 | "blue": "\033[34m", 16 | "green": "\033[32m", 17 | "reset": "\033[0m", 18 | "bold": "\033[1m"} 19 | 20 | BASE_URL = "https://raw.githubusercontent.com/Code-Institute-Org/gitpod-full-template/main/" 21 | CURRENT_VERSION = 1.0 22 | THIS_VERSION = 1.0 23 | 24 | 25 | UPGRADE_FILE_LIST = [{"filename": ".vscode/settings.json", 26 | "url": ".vscode/settings.json" 27 | }, 28 | {"filename": ".vscode/launch.json", 29 | "url": ".vscode/launch.json" 30 | }, 31 | {"filename": ".gitpod.yml", 32 | "url": ".gitpod.yml" 33 | }, 34 | {"filename": ".gitpod.dockerfile", 35 | "url": ".gitpod.dockerfile" 36 | }, 37 | {"filename": ".vscode/heroku_config.sh", 38 | "url": ".vscode/heroku_config.sh" 39 | }, 40 | {"filename": ".vscode/init_tasks.sh", 41 | "url": ".vscode/init_tasks.sh" 42 | }, 43 | {"filename": ".vscode/uptime.sh", 44 | "url": ".vscode/uptime.sh" 45 | }, 46 | {"filename": ".vscode/make_url.py", 47 | "url": ".vscode/make_url.py" 48 | }, 49 | {"filename": ".vscode/arctictern.py", 50 | "url": ".vscode/arctictern.py" 51 | }] 52 | 53 | FINAL_LINES = "\nexport POST_UPGRADE_RUN=1\nsource ~/.bashrc\n" 54 | 55 | 56 | def get_versions(): 57 | 58 | if exists(".vscode/version.txt"): 59 | with open(".vscode/version.txt", "r") as f: 60 | THIS_VERSION = float(f.read().strip()) 61 | else: 62 | with open(".vscode/version.txt", "w") as f: 63 | f.write(str(THIS_VERSION)) 64 | 65 | r = requests.get(BASE_URL + ".vscode/version.txt") 66 | CURRENT_VERSION = float(r.content) 67 | 68 | return {"this_version": THIS_VERSION, 69 | "current_version": CURRENT_VERSION} 70 | 71 | def needs_upgrade(): 72 | """ 73 | Checks the version of the current template against 74 | this version. 75 | Returns True if upgrade is needed, False if not. 76 | """ 77 | 78 | versions = get_versions() 79 | 80 | print(f"Upstream version: {versions['current_version']}") 81 | print(f"Local version: {versions['this_version']}") 82 | 83 | return versions["current_version"] > versions["this_version"] 84 | 85 | 86 | def write_version(): 87 | 88 | versions = get_versions() 89 | 90 | with open(".vscode/version.txt", "w") as f: 91 | f.write(str(versions["current_version"])) 92 | 93 | 94 | def build_post_upgrade(): 95 | 96 | r = requests.get(BASE_URL + ".vscode/upgrades.json") 97 | upgrades = json.loads(r.content.decode("utf-8")) 98 | content = "" 99 | 100 | for k,v in upgrades.items(): 101 | if float(k) > THIS_VERSION: 102 | print(f"Adding version changes for {k} to post_upgrade.sh") 103 | content += v 104 | 105 | if content: 106 | content += FINAL_LINES 107 | with open(".vscode/post_upgrade.sh", "w") as f: 108 | f.writelines(content) 109 | 110 | print("Built post_upgrade.sh. Restart your workspace for it to take effect.") 111 | 112 | 113 | def process(file, suffix): 114 | """ 115 | Replaces and optionally backs up the files that 116 | need to be changed. 117 | Arguments: file - a path and filename 118 | suffix - the suffix to the BASE_URL 119 | """ 120 | 121 | if file == ".gitpod.dockerfile" or file == ".gitpod.yml": 122 | try: 123 | shutil.copyfile(file, f"{file}.tmp") 124 | except FileNotFoundError: 125 | pass 126 | 127 | with open(file, "wb") as f: 128 | r = requests.get(BASE_URL + suffix) 129 | f.write(r.content) 130 | 131 | if exists(f"{file}.tmp"): 132 | result = os.system(f"diff -q {file} {file}.tmp > /dev/null") 133 | if result != 0: 134 | os.remove(f"{file}.tmp") 135 | return True 136 | 137 | return False 138 | 139 | 140 | def start_migration(): 141 | """ 142 | Calls the process function and 143 | renames the directory 144 | """ 145 | push_and_recreate = False 146 | 147 | if not os.path.isdir(".vscode"): 148 | print("Creating .vscode directory") 149 | os.mkdir(".vscode") 150 | 151 | for file in UPGRADE_FILE_LIST: 152 | print(f"Processing: {file['filename']}") 153 | result = process(file["filename"], file["url"]) 154 | if result == True: 155 | push_and_recreate = True 156 | 157 | if push_and_recreate: 158 | write_version() 159 | 160 | if needs_upgrade() and not push_and_recreate: 161 | build_post_upgrade() 162 | 163 | print("Changes saved.") 164 | print("Please add, commit and push to GitHub.") 165 | print("You may need to stop and restart your workspace for") 166 | print("the changes to take effect.\n") 167 | 168 | if push_and_recreate: 169 | print(f"{COLOURS['red']}{COLOURS['bold']}*** IMPORTANT INFORMATION ***{COLOURS['reset']}") 170 | print("The files used to create this workspace have been updated") 171 | print("Please download any files that are in .gitignore and") 172 | print("recreate this workspace by clicking on the Gitpod button") 173 | print("in GitHub. Then, upload your saved files again.\n") 174 | 175 | 176 | if __name__ == "__main__": 177 | 178 | print(f"\n🐦 {COLOURS['blue']}{COLOURS['bold']}ArcticTern version 0.3{COLOURS['reset']}") 179 | print("CI Template Migration Utility") 180 | print("-----------------------------") 181 | print("Upgrades the workspace to the latest version.\n") 182 | 183 | if input("Start? Y/N ").lower() == "y": 184 | start_migration() 185 | else: 186 | sys.exit("Migration cancelled by the user") 187 | -------------------------------------------------------------------------------- /.vscode/heroku_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Script to allow Heroku API key to be pasted 3 | # exported as an environment variable 4 | # 5 | # Matt Rudge, May 2021 6 | 7 | echo Heroku authentication configuration script 8 | echo Code Institute, 2021 9 | echo 10 | echo Get your Heroku API key by going to https://dashboard.heroku.com 11 | echo Go to Account Settings and click on Reveal to view your Heroku API key 12 | echo 13 | 14 | if [[ -z "${HEROKU_API_KEY}" ]]; then 15 | echo Paste your Heroku API key here or press Enter to quit: 16 | read apikey 17 | if [[ -z "${apikey}" ]]; then 18 | return 0 19 | fi 20 | echo export HEROKU_API_KEY=${apikey} >> ~/.bashrc 21 | echo Added the export. Refreshing the terminal. 22 | . ~/.bashrc > /dev/null 23 | echo Done! 24 | else 25 | echo API key is already set. 26 | echo 27 | echo To reset the API key please input "'reset'": 28 | read reset_trigger 29 | if [[ ${reset_trigger} == reset ]]; then 30 | unset HEROKU_API_KEY 31 | unset reset_trigger 32 | echo 33 | echo API key removed! 34 | else 35 | unset reset_trigger 36 | echo API key unchanged. 37 | fi 38 | echo 39 | echo Exiting 40 | fi 41 | -------------------------------------------------------------------------------- /.vscode/init_tasks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Gives a personalised greeting 4 | # Adds configuration options for SQLite 5 | # Creates run aliases 6 | # Author: Matt Rudge 7 | 8 | echo "Setting the greeting" 9 | sed -i "s/USER_NAME/$GITPOD_GIT_USER_NAME/g" ${GITPOD_REPO_ROOT}/README.md 10 | echo "Creating .sqliterc file" 11 | echo ".headers on" > ~/.sqliterc 12 | echo ".mode column" >> ~/.sqliterc 13 | echo "Your workspace is ready to use. Happy coding!" 14 | -------------------------------------------------------------------------------- /.vscode/make_url.py: -------------------------------------------------------------------------------- 1 | # Simple utility for creating the Cloudinary URL from a 2 | # cloudinary_python.txt file 3 | # Matt Rudge, November 2021 4 | 5 | import re 6 | 7 | with open("cloudinary_python.txt") as f: 8 | content = f.readlines() 9 | 10 | cloud_name = re.findall(r"['](.*?)[']",content[15])[0] 11 | api_key = re.findall(r"['](.*?)[']",content[16])[0] 12 | api_secret = re.findall(r"['](.*?)[']",content[17])[0] 13 | 14 | print(f"cloudinary://{api_key}:{api_secret}@{cloud_name}") 15 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": { 3 | "**/.DS_Store": true, 4 | "**/.git": true, 5 | "**/.github": true, 6 | "**/.gitp*": true, 7 | "**/.hg": true, 8 | "**/.svn": true, 9 | "**/.vscode": true, 10 | "**/core.Microsoft*": true, 11 | "**/core.mongo*": true, 12 | "**/core.python*": true, 13 | "**/CVS": true 14 | }, 15 | "files.autoSave": "off", 16 | "workbench.colorTheme": "Visual Studio Dark", 17 | "terminal.integrated.gpuAcceleration": "canvas", 18 | } 19 | -------------------------------------------------------------------------------- /.vscode/uptime.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Pings the webhook so that we can gather 4 | # basic usage stats. No personally identifiable 5 | # data is captured here, and it is impossible to 6 | # identify an individual user from the captured data. 7 | # Matt Rudge, April 2021 8 | 9 | UUID=$(cat /proc/sys/kernel/random/uuid) 10 | URL=https://1xthkmzwg3.execute-api.eu-west-1.amazonaws.com/prod/lrsapi/ 11 | API_KEY=jceBCdeGZP9RDeUNCfM4jIQ39Cx0jtG51QgcwDwc 12 | VERB="started" 13 | 14 | clear 15 | 16 | while true; do 17 | 18 | DATA="{\"activity_time\":\"$(date +%Y-%m-%dT%H:%M:%S).000Z\",\"actor\":\"${UUID}\",\"verb\":\"${VERB}\",\"activity_object\":\"Gitpod Workspace\",\"extra_data\":\"{}\"}" 19 | curl -s -X POST -H "x-api-key: ${API_KEY}" -d "${DATA}" ${URL} 1> /dev/null 20 | VERB="running" 21 | sleep 300 22 | 23 | done 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![CI logo](https://codeinstitute.s3.amazonaws.com/fullstack/ci_logo_small.png) 2 | 3 | Welcome USER_NAME, 4 | 5 | This is the Code Institute student template for Gitpod. We have preinstalled all of the tools you need to get started. It's perfectly ok to use this template as the basis for your project submissions. 6 | 7 | You can safely delete this README.md file or change it for your own project. Please do read it at least once, though! It contains some important information about Gitpod and the extensions we use. Some of this information has been updated since the video content was created. The last update to this file was: **June 18, 2024** 8 | 9 | ## Gitpod Reminders 10 | 11 | To run a frontend (HTML, CSS, Javascript only) application in Gitpod, in the terminal, type: 12 | 13 | `python3 -m http.server` 14 | 15 | A blue button should appear to click: _Make Public_, 16 | 17 | Another blue button should appear to click: _Open Browser_. 18 | 19 | To run a backend Python file, type `python3 app.py` if your Python file is named `app.py`, of course. 20 | 21 | A blue button should appear to click: _Make Public_, 22 | 23 | Another blue button should appear to click: _Open Browser_. 24 | 25 | By Default, Gitpod gives you superuser security privileges. Therefore, you do not need to use the `sudo` (superuser do) command in the bash terminal in any of the lessons. 26 | 27 | To log into the Heroku toolbelt CLI: 28 | 29 | 1. Log in to your Heroku account and go to *Account Settings* in the menu under your avatar. 30 | 2. Scroll down to the *API Key* and click *Reveal* 31 | 3. Copy the key 32 | 4. In Gitpod, from the terminal, run `heroku_config` 33 | 5. Paste in your API key when asked 34 | 35 | You can now use the `heroku` CLI program - try running `heroku apps` to confirm it works. This API key is unique and private to you, so do not share it. If you accidentally make it public, you can create a new one with _Regenerate API Key_. 36 | 37 | ### Connecting your Mongo database 38 | 39 | - **Connect to Mongo CLI on a IDE** 40 | - navigate to your MongoDB Clusters Sandbox 41 | - click **"Connect"** button 42 | - select **"Connect with the MongoDB shell"** 43 | - select **"I have the mongo shell installed"** 44 | - choose **mongosh (2.0 or later)** for : **"Select your mongo shell version"** 45 | - choose option: **"Run your connection string in your command line"** 46 | - in the terminal, paste the copied code `mongo "mongodb+srv://.mongodb.net/" --apiVersion 1 --username ` 47 | - replace all `` keys with your own data 48 | - enter password _(will not echo **\*\*\*\*** on screen)_ 49 | 50 | ------ 51 | 52 | ## Release History 53 | 54 | We continually tweak and adjust this template to help give you the best experience. Here is the version history: 55 | 56 | **June 18, 2024,** Add Mongo back into template 57 | 58 | **June 14, 2024,** Temporarily remove Mongo until the key issue is resolved 59 | 60 | **May 28 2024:** Fix Mongo and Links installs 61 | 62 | **April 26 2024:** Update node version to 16 63 | 64 | **September 20 2023:** Update Python version to 3.9.17. 65 | 66 | **September 1 2021:** Remove `PGHOSTADDR` environment variable. 67 | 68 | **July 19 2021:** Remove `font_fix` script now that the terminal font issue is fixed. 69 | 70 | **July 2 2021:** Remove extensions that are not available in Open VSX. 71 | 72 | **June 30 2021:** Combined the P4 and P5 templates into one file, added the uptime script. See the FAQ at the end of this file. 73 | 74 | **June 10 2021:** Added: `font_fix` script and alias to fix the Terminal font issue 75 | 76 | **May 10 2021:** Added `heroku_config` script to allow Heroku API key to be stored as an environment variable. 77 | 78 | **April 7 2021:** Upgraded the template for VS Code instead of Theia. 79 | 80 | **October 21 2020:** Versions of the HTMLHint, Prettier, Bootstrap4 CDN and Auto Close extensions updated. The Python extension needs to stay the same version for now. 81 | 82 | **October 08 2020:** Additional large Gitpod files (`core.mongo*` and `core.python*`) are now hidden in the Explorer, and have been added to the `.gitignore` by default. 83 | 84 | **September 22 2020:** Gitpod occasionally creates large `core.Microsoft` files. These are now hidden in the Explorer. A `.gitignore` file has been created to make sure these files will not be committed, along with other common files. 85 | 86 | **April 16 2020:** The template now automatically installs MySQL instead of relying on the Gitpod MySQL image. The message about a Python linter not being installed has been dealt with, and the set-up files are now hidden in the Gitpod file explorer. 87 | 88 | **April 13 2020:** Added the _Prettier_ code beautifier extension instead of the code formatter built-in to Gitpod. 89 | 90 | **February 2020:** The initialisation files now _do not_ auto-delete. They will remain in your project. You can safely ignore them. They just make sure that your workspace is configured correctly each time you open it. It will also prevent the Gitpod configuration popup from appearing. 91 | 92 | **December 2019:** Added Eventyret's Bootstrap 4 extension. Type `!bscdn` in a HTML file to add the Bootstrap boilerplate. Check out the README.md file at the official repo for more options. 93 | 94 | ------ 95 | 96 | ## FAQ about the uptime script 97 | 98 | **Why have you added this script?** 99 | 100 | It will help us to calculate how many running workspaces there are at any one time, which greatly helps us with cost and capacity planning. It will help us decide on the future direction of our cloud-based IDE strategy. 101 | 102 | **How will this affect me?** 103 | 104 | For everyday usage of Gitpod, it doesn’t have any effect at all. The script only captures the following data: 105 | 106 | - An ID that is randomly generated each time the workspace is started. 107 | - The current date and time 108 | - The workspace status of “started” or “running”, which is sent every 5 minutes. 109 | 110 | It is not possible for us or anyone else to trace the random ID back to an individual, and no personal data is being captured. It will not slow down the workspace or affect your work. 111 | 112 | **So….?** 113 | 114 | We want to tell you this so that we are being completely transparent about the data we collect and what we do with it. 115 | 116 | **Can I opt out?** 117 | 118 | Yes, you can. Since no personally identifiable information is being captured, we'd appreciate it if you let the script run; however if you are unhappy with the idea, simply run the following commands from the terminal window after creating the workspace, and this will remove the uptime script: 119 | 120 | ``` 121 | pkill uptime.sh 122 | rm .vscode/uptime.sh 123 | ``` 124 | 125 | **Anything more?** 126 | 127 | Yes! We'd strongly encourage you to look at the source code of the `uptime.sh` file so that you know what it's doing. As future software developers, it will be great practice to see how these shell scripts work. 128 | 129 | --- 130 | 131 | Happy coding! 132 | --------------------------------------------------------------------------------