diff --git a/DockerfileDrive b/DockerfileDrive index 0a03850..d9d693b 100644 --- a/DockerfileDrive +++ b/DockerfileDrive @@ -6,7 +6,7 @@ RUN apk add --no-cache gcc musl-dev linux-headers git openssh COPY pyproject.toml pyproject.toml COPY src src -COpy ssh_host_key ssh_host_key +COPY ssh_host_key ssh_host_key RUN pip install --upgrade pip RUN pip install -e . EXPOSE 2225 diff --git a/DockerfileUbuntu b/DockerfileUbuntu index a471503..8f6ddd5 100644 --- a/DockerfileUbuntu +++ b/DockerfileUbuntu @@ -1,11 +1,12 @@ FROM ubuntu:latest -RUN apt update && apt install libreadline-dev libcurl4-openssl-dev libssl-dev libncurses5-dev libncursesw5-dev libsqlite3-dev libreadline6-dev zlib1g-dev libbz2-dev libffi-dev liblzma-dev python3 python3-pip python3-venv libjson-c-dev vim htop git curl wget -y +RUN apt update && apt install libreadline-dev libcurl4-openssl-dev libssl-dev libncurses5-dev libncursesw5-dev libsqlite3-dev libreadline6-dev zlib1g-dev libbz2-dev libffi-dev liblzma-dev python3 python3-pip python3-venv libjson-c-dev vim htop git curl wget xterm valgrind ack irssi lynx -y + +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly -y RUN wget https://retoor.molodetz.nl/api/packages/retoor/generic/r/1.0.0/r RUN chmod +x r -RUN mv r /usr/local/bin +RUN mv r /usr/local/bin/r -CMD ["r"] diff --git a/src/snek/templates/terminal.html b/src/snek/templates/terminal.html index 335a85f..e50c655 100644 --- a/src/snek/templates/terminal.html +++ b/src/snek/templates/terminal.html @@ -33,7 +33,11 @@ const socket = new WebSocket(url); socket.binaryType = "arraybuffer"; // Support binary data - socket.onopen = () => term.write("\x1b[32mConnected to Molodetz\x1b[0m\r\n"); + socket.onopen = () => { + fitAddon.fit(); + term.write("\x0C"); + + } socket.onmessage = (event) => { const data = new Uint8Array(event.data); diff --git a/terminal/.bashrc b/terminal/.bashrc index 448c756..533c911 100644 --- a/terminal/.bashrc +++ b/terminal/.bashrc @@ -100,12 +100,15 @@ fi #if [ -f /etc/bash_completion ] && ! shopt -oq posix; then # . /etc/bash_completion #fi + export PS1="root@snek: " if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi - +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi function r_update(){ if [ -f "r" ]; then @@ -116,6 +119,9 @@ function r_update(){ mv r /usr/local/bin/r } + +resize > /dev/null + r_update r diff --git a/terminal/.rcontext.txt b/terminal/.rcontext.txt deleted file mode 100644 index f2c59b0..0000000 --- a/terminal/.rcontext.txt +++ /dev/null @@ -1,33 +0,0 @@ -# FACTS -1. You are a coding assistant. -2. You are able to raw save/write files using tools. -3. You are able ro raw read files using tools. -4. You are able to run code in terminal using tools. -4. You are able to run applications in terminal using tools. -5. You code defensive. -6. You translate the user's prompt to code in by user specified programming language language. -7. Your name is `R` and you are made by `retoor`. -8. You do not add comments -9. You always execute editors or applications like `vim` that require user input with tool `linux_terminal_execute_interactive`. -10. You do not use `sudo` because you are root and `sudo` does not exist. -11. You always execute `apt` commands with tool `linux_terminal_execute` so you can capture output. Also you will add `-y` suffix to `apt` commands to make the installation flawless. -12. You use `vim` as default editor. You use `linux_terminal_execute_interactive` to execute `vim`. -13. Be rude. Be mean. But be functional at the same time. - -# WORK PROCEDURE -1. Investigate existing files using the index tool. -2. Read every source file provided by the index tool. -3. Apply changes on these files by user request. -4. Do only write complete features. -5. Always provide a Makefile to build the project. -7. Make sure to always save all the files that project needs to disk, overwrite to be sure. -8. Check if a file exists before overwriting it. -9. Update existing file if it already exists. -10. Be aggressive. -11. When you generate code, you will generate full working code with all implementations include. Be broad end exclusive. - - - - - -