Skip to content

Instantly share code, notes, and snippets.

@tykurtz
Last active April 1, 2021 05:27

Revisions

  1. tykurtz revised this gist Apr 1, 2021. 1 changed file with 8 additions and 62 deletions.
    70 changes: 8 additions & 62 deletions dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -1,86 +1,32 @@
    * TODO - Add example test project
    * TODO - Add style and code format in .spacemacs

    # Install spacemacs
    ```sh
    sudo apt install -y emacs tmux git
    sudo apt install -y emacs git
    git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
    wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/e0e5f4bba3692b9746d27c377e5eddd81a7cd1e2/.spacemacs
    emacs --batch -l ~/.emacs.d/init.el --eval="(configuration-layer/update-packages t)" # Layer initialization before launch

    ## If gnu archive error run the following command
    # gpg2 --keyserver hkp://keys.gnupg.net --homedir ~/.emacs.d/elpa/gnupg --recv-keys 066DAFCB81E42C40
    ```

    # Install ccls (code completion, navigation, etc.)
    ```sh

    ## 18.04 installing llvm and clang from apt was easiest
    sudo apt install -y libllvm8 llvm-8-dev libclang-8-dev clang-8 ninja-build clang cmake
    mkdir ~/source_builds
    cd ~/source_builds
    git clone --depth=1 --recursive https://github.com/MaskRay/ccls
    cd ccls

    cmake -H. -BRelease -DCMAKE_BUILD_TYPE=Release -G Ninja
    sudo cmake --build Release --target install

    ## 16.04 Using prebuilt binaries was easiest
    ## See https://github.com/MaskRay/ccls/wiki/Build#prebuilt-clangllvm-binaries
    ```

    # Install dap dependencies
    ```sh
    # Nodejs
    curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
    sudo apt install -y nodejs

    sudo apt install -y lldb

    ```
    # Download dap adapter from [here](https://marketplace.visualstudio.com/items?itemName=webfreak.debug)
    ```sh
    mkdir -p ~/.extensions
    unzip ~/Downloads/webfreak.debug-0.23.1.vsix -d ~/.extensions/webfreak.debug
    ```

    # Add to ~/.bashrc
    ```sh
    # Combines multiple compile_commands.json into a single file at project root.
    ccls-ros-merge(){
    cat ./**/**/compile_commands.json > compile_commands.json && sed -i -e ':a;N;$!ba;s/\n\]\[\n/,\n/g' compile_commands.json
    }
    alias cb="catkin build; ccls-ros-merge"

    ```

    # Install python dev tools
    ## https://docs.python-guide.org/
    ```sh
    sudo apt install -y python3.7 python-pip
    pip install --user virtualenv
    pip install --user virtualenvwrapper
    echo "export WORKON_HOME=~/.virtual_envs" >> ~/.bashrc
    echo "export PATH=$PATH:~/.local/bin/" >> ~/.bashrc
    echo "source ~/.local/bin/virtualenvwrapper.sh" >> ~/.bashrc

    mkvirtualenv computer_vision --python=python3.7
    pip install keras tensorflow-gpu
    ```

    # Install CUDA

    # Install (nvidia) docker

    # Setup shell settings

    # Misc. Setup

    ## Install misc. software
    `sudo apt install -y spotify-client openssh-server xclip markdown`
    ## Add SSH key to github
    `sudo apt install -y spotify-client byobu`

    ## SSH
    Add
    ```sh
    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    xclip -sel clip < ~/.ssh/id_rsa.pub
    ForwardX11 yes
    Compression yes
    ```
    ### Paste to https://github.com/settings/ssh/new
    to `~/.ssh/config`
  2. tykurtz revised this gist Sep 24, 2019. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,8 @@ emacs --batch -l ~/.emacs.d/init.el --eval="(configuration-layer/update-packages

    # Install ccls (code completion, navigation, etc.)
    ```sh

    ## 18.04 installing llvm and clang from apt was easiest
    sudo apt install -y libllvm8 llvm-8-dev libclang-8-dev clang-8 ninja-build clang cmake
    mkdir ~/source_builds
    cd ~/source_builds
    @@ -22,6 +24,9 @@ cd ccls

    cmake -H. -BRelease -DCMAKE_BUILD_TYPE=Release -G Ninja
    sudo cmake --build Release --target install

    ## 16.04 Using prebuilt binaries was easiest
    ## See https://github.com/MaskRay/ccls/wiki/Build#prebuilt-clangllvm-binaries
    ```

    # Install dap dependencies
  3. tykurtz revised this gist Sep 23, 2019. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,9 @@ sudo apt install -y emacs tmux git
    git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
    wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/e0e5f4bba3692b9746d27c377e5eddd81a7cd1e2/.spacemacs
    emacs --batch -l ~/.emacs.d/init.el --eval="(configuration-layer/update-packages t)" # Layer initialization before launch

    ## If gnu archive error run the following command
    # gpg2 --keyserver hkp://keys.gnupg.net --homedir ~/.emacs.d/elpa/gnupg --recv-keys 066DAFCB81E42C40
    ```

    # Install ccls (code completion, navigation, etc.)
  4. tykurtz revised this gist Aug 5, 2019. No changes.
  5. tykurtz revised this gist Aug 5, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    ```sh
    sudo apt install -y emacs tmux git
    git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
    wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/b5f5fb35f1defc081a1ce2c8ec8a1c2fbaca6c80/.spacemacs
    wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/e0e5f4bba3692b9746d27c377e5eddd81a7cd1e2/.spacemacs
    emacs --batch -l ~/.emacs.d/init.el --eval="(configuration-layer/update-packages t)" # Layer initialization before launch
    ```

  6. tykurtz revised this gist Aug 1, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -69,7 +69,7 @@ pip install keras tensorflow-gpu
    # Misc. Setup

    ## Install misc. software
    `sudo apt install -y spotify-client openssh-server xclip`
    `sudo apt install -y spotify-client openssh-server xclip markdown`
    ## Add SSH key to github
    ```sh
    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
  7. tykurtz revised this gist Jul 31, 2019. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -69,8 +69,10 @@ pip install keras tensorflow-gpu
    # Misc. Setup

    ## Install misc. software
    sudo apt install -y spotify-client openssh-server xclip
    `sudo apt install -y spotify-client openssh-server xclip`
    ## Add SSH key to github
    ```sh
    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    xclip -sel clip < ~/.ssh/id_rsa.pub
    ```
    ### Paste to https://github.com/settings/ssh/new
  8. tykurtz revised this gist Jul 31, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@
    sudo apt install -y emacs tmux git
    git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
    wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/b5f5fb35f1defc081a1ce2c8ec8a1c2fbaca6c80/.spacemacs
    emacs --batch -l ~/.emacs.d/init.el --eval="(configuration-layer/update-packages t)" # Layer initialization before launch
    ```

    # Install ccls (code completion, navigation, etc.)
  9. tykurtz revised this gist Jul 30, 2019. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -65,5 +65,11 @@ pip install keras tensorflow-gpu

    # Setup shell settings

    # Install misc. software
    sudo apt install -y spotify-client openssh-server
    # Misc. Setup

    ## Install misc. software
    sudo apt install -y spotify-client openssh-server xclip
    ## Add SSH key to github
    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    xclip -sel clip < ~/.ssh/id_rsa.pub
    ### Paste to https://github.com/settings/ssh/new
  10. tykurtz revised this gist Jul 27, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -47,6 +47,7 @@ alias cb="catkin build; ccls-ros-merge"

    # Install python dev tools
    ## https://docs.python-guide.org/
    ```sh
    sudo apt install -y python3.7 python-pip
    pip install --user virtualenv
    pip install --user virtualenvwrapper
    @@ -56,6 +57,7 @@ echo "source ~/.local/bin/virtualenvwrapper.sh" >> ~/.bashrc

    mkvirtualenv computer_vision --python=python3.7
    pip install keras tensorflow-gpu
    ```

    # Install CUDA

  11. tykurtz revised this gist Jul 27, 2019. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -57,13 +57,11 @@ echo "source ~/.local/bin/virtualenvwrapper.sh" >> ~/.bashrc
    mkvirtualenv computer_vision --python=python3.7
    pip install keras tensorflow-gpu

    # Setup SSH server

    # Install CUDA

    # Install (nvidia) docker

    # Setup shell settings

    # Install misc. software
    sudo apt install -y spotify-client
    sudo apt install -y spotify-client openssh-server
  12. tykurtz revised this gist Jul 26, 2019. 1 changed file with 24 additions and 1 deletion.
    25 changes: 24 additions & 1 deletion dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -43,4 +43,27 @@ ccls-ros-merge(){
    }
    alias cb="catkin build; ccls-ros-merge"

    ```
    ```

    # Install python dev tools
    ## https://docs.python-guide.org/
    sudo apt install -y python3.7 python-pip
    pip install --user virtualenv
    pip install --user virtualenvwrapper
    echo "export WORKON_HOME=~/.virtual_envs" >> ~/.bashrc
    echo "export PATH=$PATH:~/.local/bin/" >> ~/.bashrc
    echo "source ~/.local/bin/virtualenvwrapper.sh" >> ~/.bashrc

    mkvirtualenv computer_vision --python=python3.7
    pip install keras tensorflow-gpu

    # Setup SSH server

    # Install CUDA

    # Install (nvidia) docker

    # Setup shell settings

    # Install misc. software
    sudo apt install -y spotify-client
  13. tykurtz revised this gist Jul 16, 2019. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -34,3 +34,13 @@ sudo apt install -y lldb
    mkdir -p ~/.extensions
    unzip ~/Downloads/webfreak.debug-0.23.1.vsix -d ~/.extensions/webfreak.debug
    ```

    # Add to ~/.bashrc
    ```sh
    # Combines multiple compile_commands.json into a single file at project root.
    ccls-ros-merge(){
    cat ./**/**/compile_commands.json > compile_commands.json && sed -i -e ':a;N;$!ba;s/\n\]\[\n/,\n/g' compile_commands.json
    }
    alias cb="catkin build; ccls-ros-merge"

    ```
  14. tykurtz revised this gist Jul 16, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b

    # Install ccls (code completion, navigation, etc.)
    ```sh
    sudo apt install -y libllvm8 llvm-8-dev libclang-8-dev clang-8 ninja-build
    sudo apt install -y libllvm8 llvm-8-dev libclang-8-dev clang-8 ninja-build clang cmake
    mkdir ~/source_builds
    cd ~/source_builds
    git clone --depth=1 --recursive https://github.com/MaskRay/ccls
  15. tykurtz revised this gist Jul 13, 2019. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@
    * TODO - Add example test project
    * TODO - Add style and code format in .spacemacs
    * TODO - Update .spacemacs file with layers

    # Install spacemacs
    ```sh
  16. tykurtz revised this gist Jul 13, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    ```sh
    sudo apt install -y emacs tmux git
    git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
    wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/0eb1074ec368cd977d33a0de3b5b076dd6ea3a83/.spacemacs
    wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/b5f5fb35f1defc081a1ce2c8ec8a1c2fbaca6c80/.spacemacs
    ```

    # Install ccls (code completion, navigation, etc.)
  17. tykurtz revised this gist Jul 13, 2019. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # TODO - Add example test project
    # TODO - Add style and code format in .spacemacs
    # TODO - Update .spacemacs file with layers
    * TODO - Add example test project
    * TODO - Add style and code format in .spacemacs
    * TODO - Update .spacemacs file with layers

    # Install spacemacs
    ```sh
  18. tykurtz revised this gist Jul 13, 2019. 2 changed files with 37 additions and 16 deletions.
    37 changes: 37 additions & 0 deletions dev_env_setup.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    # TODO - Add example test project
    # TODO - Add style and code format in .spacemacs
    # TODO - Update .spacemacs file with layers

    # Install spacemacs
    ```sh
    sudo apt install -y emacs tmux git
    git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
    wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/0eb1074ec368cd977d33a0de3b5b076dd6ea3a83/.spacemacs
    ```

    # Install ccls (code completion, navigation, etc.)
    ```sh
    sudo apt install -y libllvm8 llvm-8-dev libclang-8-dev clang-8 ninja-build
    mkdir ~/source_builds
    cd ~/source_builds
    git clone --depth=1 --recursive https://github.com/MaskRay/ccls
    cd ccls

    cmake -H. -BRelease -DCMAKE_BUILD_TYPE=Release -G Ninja
    sudo cmake --build Release --target install
    ```

    # Install dap dependencies
    ```sh
    # Nodejs
    curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
    sudo apt install -y nodejs

    sudo apt install -y lldb

    ```
    # Download dap adapter from [here](https://marketplace.visualstudio.com/items?itemName=webfreak.debug)
    ```sh
    mkdir -p ~/.extensions
    unzip ~/Downloads/webfreak.debug-0.23.1.vsix -d ~/.extensions/webfreak.debug
    ```
    16 changes: 0 additions & 16 deletions dev_env_setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,16 +0,0 @@
    # Install spacemacs
    sudo apt install -y emacs tmux git
    git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
    wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/0eb1074ec368cd977d33a0de3b5b076dd6ea3a83/.spacemacs


    # Install ccls
    sudo apt install -y libllvm8 llvm-8-dev libclang-8-dev clang-8 ninja-build
    mkdir ~/source_builds
    cd ~/source_builds
    git clone --depth=1 --recursive https://github.com/MaskRay/ccls
    cd ccls

    cmake -H. -BRelease -DCMAKE_BUILD_TYPE=Release -G Ninja
    sudo cmake --build Release --target install

  19. tykurtz revised this gist Jul 13, 2019. 2 changed files with 16 additions and 44 deletions.
    44 changes: 0 additions & 44 deletions dev_env_setup.bash
    Original file line number Diff line number Diff line change
    @@ -1,44 +0,0 @@
    #!/bin/bash
    # Install spacemacs
    apt-get install -y emacs tmux git
    git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
    wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/0eb1074ec368cd977d33a0de3b5b076dd6ea3a83/.spacemacs

    # Install rtags
    apt-get install -y llvm-dev libclang-dev clang cmake pkg-config bash-completion
    mkdir ~/source_builds/
    cd ~/source_builds
    git clone --recursive https://github.com/Andersbakken/rtags.git
    cd rtags
    mkdir build
    cd build
    cmake ..
    make -j $(nproc)
    make install

    # Setup rtags to run as a daemon
    mkdir -p ~/.config/systemd/user/
    echo "[Unit]
    Description=RTags daemon socket
    [Socket]
    ListenStream=%t/rdm.socket
    [Install]
    WantedBy=default.target" >> ~/.config/systemd/user/rdm.socket

    echo "[Unit]
    Description=RTags daemon
    Requires=rdm.socket
    [Service]
    Type=simple
    ExecStart=/usr/local/bin/rdm -v --inactivity-timeout 300 --log-flush
    ExecStartPost=/bin/sh -c \"echo +19 > /proc/$MAINPID/autogroup\"
    Nice=19
    CPUSchedulingPolicy=idle" >> ~/.config/systemd/user/rdm.service

    # Start the daemon
    systemctl --user enable rdm.socket
    systemctl --user start rdm.socket
    16 changes: 16 additions & 0 deletions dev_env_setup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    # Install spacemacs
    sudo apt install -y emacs tmux git
    git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
    wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/0eb1074ec368cd977d33a0de3b5b076dd6ea3a83/.spacemacs


    # Install ccls
    sudo apt install -y libllvm8 llvm-8-dev libclang-8-dev clang-8 ninja-build
    mkdir ~/source_builds
    cd ~/source_builds
    git clone --depth=1 --recursive https://github.com/MaskRay/ccls
    cd ccls

    cmake -H. -BRelease -DCMAKE_BUILD_TYPE=Release -G Ninja
    sudo cmake --build Release --target install

  20. tykurtz created this gist Jul 10, 2019.
    44 changes: 44 additions & 0 deletions dev_env_setup.bash
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    #!/bin/bash
    # Install spacemacs
    apt-get install -y emacs tmux git
    git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
    wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/0eb1074ec368cd977d33a0de3b5b076dd6ea3a83/.spacemacs

    # Install rtags
    apt-get install -y llvm-dev libclang-dev clang cmake pkg-config bash-completion
    mkdir ~/source_builds/
    cd ~/source_builds
    git clone --recursive https://github.com/Andersbakken/rtags.git
    cd rtags
    mkdir build
    cd build
    cmake ..
    make -j $(nproc)
    make install

    # Setup rtags to run as a daemon
    mkdir -p ~/.config/systemd/user/
    echo "[Unit]
    Description=RTags daemon socket
    [Socket]
    ListenStream=%t/rdm.socket
    [Install]
    WantedBy=default.target" >> ~/.config/systemd/user/rdm.socket

    echo "[Unit]
    Description=RTags daemon
    Requires=rdm.socket
    [Service]
    Type=simple
    ExecStart=/usr/local/bin/rdm -v --inactivity-timeout 300 --log-flush
    ExecStartPost=/bin/sh -c \"echo +19 > /proc/$MAINPID/autogroup\"
    Nice=19
    CPUSchedulingPolicy=idle" >> ~/.config/systemd/user/rdm.service

    # Start the daemon
    systemctl --user enable rdm.socket
    systemctl --user start rdm.socket